salesforce / salesforce/design-system-react

Tabs - Clicking a Tab should allow the user to start using keyboard navigation

Open
#1,053 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accessibility Estimate: Medium tabs
Dominant language
JavaScript
Stars
982
Forks
440
Avg merge
1d 21h
Merged PRs (30d)
4

Description

I think the markup is out of date, which is why this is happening.

Each tab has 2 focusable elements; the list item and it's nested anchor.

For keyboard navigation the list item is wired up to be the tab which get's aria-selected and listens to key events.

A mouse user will click the tab, but because it has a nested anchor element, the anchor takes the users focus, which has no semantic meaning and does not respond to key events.

If you match SLDS markup this should go away

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named; start by locating the Tabs component and comparing its rendered markup with the SLDS tab markup referenced in the issue. Done means clicking a tab leaves focus on the semantic tab element, which receives aria-selected and responds to keyboard navigation instead of the nested anchor.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.