-
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
Added trap focus and focus redirection #14877
Added trap focus and focus redirection #14877
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple thoughts here relating to the a11y failure in the tests
…nto 14691-a11y-notification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but we need to remove the test story. I'll do it real quick
6d2b92c
* fix: added trap focus and focus redirection * test: added test to match tabIndex * fix: fixed focus issues to action button * chore: remove test story * fix: fixed test * fix: fixed avt test to match component --------- Co-authored-by: TJ Egan <tw15egan@gmail.com> Co-authored-by: Taylor Jones <taylor.jones826@gmail.com> Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com> Co-authored-by: Alison Joseph <alison.joseph@us.ibm.com>
Closes #14691
Enhanced the ActionableNotification component by implementing trap focus functionality, alongside the addition of a tabIndex attribute to the parent div. This enhancement ensures that when a user receives a notification with the hasFocus prop set to true, the focus is correctly directed to the component.
Changelog
New
tabIndex
in the parent div.Testing / Reviewing
TestFocus
variantTestFocus
variant