Skip to content

A11y: Tabs select when navigating with VoiceOver #8063

@backwardok

Description

@backwardok

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

When using VoiceOver on either iOS or macOS, navigating forward activates the next tab. This makes it difficult to access the actual tab panel content of a given tab.

Reproducible demo

https://docusaurus.io/docs/markdown-features/tabs

Steps to reproduce

For iOS VoiceOver:

  1. Turn on VoiceOver
  2. Open a page with the Tabs component
  3. Swipe right through the content to get to the tabs
  4. Swipe right through the tabs

macOS VoiceOver has the same steps, but replace "Swipe right" with "Press VO (control + option) + right arrow"

Expected behavior

User can navigate through the tabs to read through the tabs to activate or navigate forward to the tab panel content. The tab has to be activated by the user before it switches. This behavior works as expected on the ARIA authoring practices guide example for automatic tabs.

Actual behavior

When navigating with VoiceOver on, the tab switches automatically when reading through the tabs. Navigating with VoiceOver will move focus when it moves to a focusable element. But, because the Tabs code triggers a tab change on tab focus, this results in the tab also activating when reading the new tab.

Example of behavior on the ARIA example site, where I'm navigating around and the tab panel doesn't change until I select it:
Set of 4 tabs and a tab panel with first tab selected. VoiceOver outline on tabs moves to later tabs and a keyboard focus ring also appears around the tab, but the selected tab remains on the first tab. Selecting a tab then changes the tab panel content.

Example of behavior on the Docusaurus site, where navigating around also selects the tab and updates the tab panel:
Set of 3 tabs and a tab panel with the first tab selected and VoiceOver outline on the first tab. As VoiceOver outline moves to other tabs, the tab gets selected and the tab panel also changes.

Your environment

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: a11yRelated to accessibility concerns of the default themegood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.hacktoberfeststatus: accepting prThis issue has been accepted, and we are looking for community contributors to implement this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions