Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[a11y]: ContentSwitcher - tab navigation #18362

Open
2 tasks done
VadimDez opened this issue Jan 16, 2025 · 1 comment
Open
2 tasks done

[a11y]: ContentSwitcher - tab navigation #18362

VadimDez opened this issue Jan 16, 2025 · 1 comment

Comments

@VadimDez
Copy link

Package

@carbon/react

Browser

Chrome, Edge, Safari, Firefox

Operating System

MacOS, Windows

Package version

1.74.0

React version

No response

Automated testing tool and ruleset

Manual testing

Assistive technology

No response

Description

While working with customer, we noticed accessibility issue in ContentSwitcher, which allows navigation by using arrow left and right, but it is not intuitive for the visually impaired users that are using "Tab" key for the navigation across the page. Once user navigates to the ContentSwitcher - he's also not aware how many options are there at all.

One possible fix that we came up is to indicate to the user in the alt text that there're multiple options and user has to navigate with arrows.

WCAG 2.1 Violation

No response

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-contentswitcher--default

Steps to reproduce

Try to navigate with Tab key

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Code of Conduct

@VadimDez
Copy link
Author

VadimDez commented Jan 16, 2025

Setting tabIndex=0 kinda solves the problem but user has to press Tab key twice

<ContentSwitcher>
  <Switch tabIndex={0} name="a" text="a"/>
  <Switch tabIndex={0} name="b" text="b" />
</ContentSwitcher>

And there's no way to keep the first option to be selected after navigating away with Tab key.

Desired behavior would be:

  • navigate to ContentSwitcher
  • navigate with Tab through the options
  • select one
  • and then navigate away from ContentSwitcher using tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant