Skip to content

A11Y: Implement tab behavior for homepage tabs#3115

Open
lvachon1 wants to merge 8 commits intomainfrom
lev/a11y/main_page_tabs
Open

A11Y: Implement tab behavior for homepage tabs#3115
lvachon1 wants to merge 8 commits intomainfrom
lev/a11y/main_page_tabs

Conversation

@lvachon1
Copy link
Copy Markdown
Contributor

Scope

Asana Ticket: ♿ Implement tab behavior for homepage tabs

Implementation

Changed the JS for the main page tabs to adhere to a11y guidelines:

  • Only the active tab is focusable with the [tab] key, the arrow keys are used to focus other tabs, [space] or [enter] is used to active the focused tab
  • Hitting [tab] from a tab group focuses the next focusable item in the tab's related content, not the next tab
  • aria-selected attribute is set to true for the currently focused tab
  • aria-current attribute is set to "page" for the currently active tab

Updated the template to wrap things in a

instead of a
and setup the initial aria attributes and tabindexes (tabindices?)

Screenshots

Screen.Recording.2026-04-15.at.2.02.07.PM.mov

How to test

http://localhost:4001/

Use keyboard navigation and inspect the main page tabs to ensure the aria attributes are being set correctly, and the keyboard behavior works as expected.

…delines regarding keyboard navigation and aria attributes (aria-selected and aria-current). Users now switch tabs with arrow keys after focusing on the tab nav, and activate the tab with space or enter. Pressing tab while in the tab nav goes focuses on the content of that tab, pressing shift tab goes to the previous (non tab) focusable element on the page.
… not the active visual indicator. Cleaned up more code. This change makes it so aria-selected follows the focus, and aria-current follows the active visual indicator.
…value (it was always true, so I removed the ifs).
@lvachon1 lvachon1 requested a review from a team as a code owner April 15, 2026 18:05
@lvachon1 lvachon1 requested a review from joshlarson April 15, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant