-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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]: inline and toast notifications does not take keyboard focus #15907
Comments
@mbgower this is intentional because these get a role of ActionableNotification has |
It's not so much a screen reader issue as it is a keyboard issue. A sighted mouse user can dismiss the notification. A sighted keyboard user cannot. The bigger potential issue happens with the Toast version of the notification when it obscures content underneath it. That is a possible failure of Focus Not Obscured. There are a few solutions to this, including providing timed display of Toaster, after which it is 'dismissed' and gets added to a list of notifications, which themselves are reviewable and able to be cleared by the user. |
The testers for my application (IBM Z Hardware Management Console) just hit this. I believe the toast notification should have |
Initially, to make this equitable, we had We should review together the additional solutions for Focus Not Obscured. ToastNotification already supports time-based dismissal via the I don't think we could remove the close button from ToastNotification and InlineNotification without a breaking change. If we remove the ability to dismiss these manually, we would need to require a An adjacent issue here is that user interaction is required with ActionableNotification with |
Package
@carbon/react
Browser
Chrome
Operating System
MacOS
Package version
https://react.carbondesignsystem.com/?path=/story/components-notifications-inline--default#storybook-preview-wrapper
React version
Storybook
Automated testing tool and ruleset
n/a
Assistive technology
untested
Description
When using the inline notification in storybook, it never receives a focus indicator (and does not seem to receive keyboard focus either).
The cause appears to be that there is a -1 tabindex set on the close button, so it will never take focus.
The same issue occurs with the Toast notification example
WCAG 2.1 Violation
2.4.7 Focus Visible; 2.1.1 keyboard... Take your pick!
Reproduction/example
https://react.carbondesignsystem.com/iframe.html?id=components-notifications-inline--default&viewMode=story
Steps to reproduce
At no point will the x take focus.
Code of Conduct
The text was updated successfully, but these errors were encountered: