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]: Popover storybook does not close on loss of focus, resulting in potential failure of 2.4.11 #15917

Open
1 of 2 tasks
mbgower opened this issue Mar 7, 2024 · 0 comments
Labels

Comments

@mbgower
Copy link

mbgower commented Mar 7, 2024

Package

@carbon/react

Browser

Chrome

Operating System

No response

Package version

https://react.carbondesignsystem.com/?path=/story/components-popover--tab-tip#storybook-preview-wrapper

React version

No response

Automated testing tool and ruleset

n/a

Assistive technology

No response

Description

In storybook, most of the popover examples are (improperly) expanded by default, instead of being able to be triggered by the target. These should all be addressed.
However, there is one example, the tab tip, which provides both an expanded and unexpanded popover: https://react.carbondesignsystem.com/?path=/story/components-popover--tab-tip#storybook-preview-wrapper

The second one can be opened by keyboard and closes when it loses focus (as intended).
However, the first popover, which is already opened by default, must be manually closed by keyboard; if the user simply tabs out of the last item in the popover, it does not collapse, which it must do by default, or be at risk of failing WCAG 2.2 Focus Not Obscured.
Note that the second popover, which correctly collapses on loss of focus when tabbing, fails to close on loss of focus when shift+tabbing.

WCAG 2.1 Violation

WCAG 2.2 Focus Not Obscured (Minimum)

Reproduction/example

https://react.carbondesignsystem.com/?path=/story/components-popover--tab-tip#storybook-preview-wrapper

Steps to reproduce

  1. Launch https://react.carbondesignsystem.com/?path=/story/components-popover--tab-tip#storybook-preview-wrapper
  2. use Space to activate the Tab Tip in the left navigation, then press Tab and activate Skip to Canvas, and navigate to the main region
  3. Tab through the open Pop over and continuing tabbing through its children until the focus goes to the next gear icon (the first pop over should close on loss of focus; it does not)
  4. Activate the second gear; the popover appears
  5. Tab through all its children until focus leaves the popover; the popover collapses (as expected)
  6. It is possible to also demonstrate a failure on the second popover. Shift+tab back to the second gear and press Space to open; the popover opens
  7. Tab once or twice into the popover children, then Shift+Tab until the focus reaches the gear icon, and then one more time so it goes back to the first gear icon. The second popover should close at this point, but fails to do so.

Code of Conduct

@sstrubberg sstrubberg moved this to 🕵️‍♀️ Triage in Design System Mar 28, 2024
@andreancardona andreancardona moved this from 🕵️‍♀️ Triage to ⏱ Backlog in Design System Apr 1, 2024
@andreancardona andreancardona added severity: 3 https://ibm.biz/carbon-severity component: popover labels Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

2 participants