-
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
[Floating Menu] Focus wrap should work without having to put in extra elements #3603
Comments
Hi 👋 thank you for reporting! One thing in consideration is adding focus-trap element in the end of floating menu body instead of letting application add one at end of |
@asudoh we can't just add an empty input in to the code that doesn't do anything. This is extremely confusing for screen reader users as this element is not actually hidden for them (which is what allows it to be focusable and trigger the focus wrap. Update: |
Good thoughts @elizabethsjudd - Another thing to bring up here is that such focus trap element won't be read as "focused" actually, given we change focus as soon as the trap element gets the focus. |
@asudoh if you want to assign this issue to me I can work on making the updates. I know modals, overflow menu, and tooltips use this feature because they are ones WH currently has implemented. Are their other components that I should update as well? |
If we can agree on |
I can definitely make the change to the |
@asudoh do you want to assign this issue to me? |
I did, but I'd say, don't wait for assignment - Carbon is open source! |
@asudoh Thanks for assigning it to me! It's for my own team's processes that I request the issues be assigned to me before working on them. |
@asudoh @dakahn @snidersd
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
Demos are deceiving because there is a visually hidden input that is not part of the "demo" code but this input is required in order to have the a11y focus wrap feature work. I understand that any "focusable" element following a floating menu would work and it does not have to be this specific input but we should not assume that of our users' use-cases. Focus wrap should work without having to add in extra elements, especially if it's something like this input which is visually hidden but is visible to screen reader users, making it really confusing as to why they are reaching a text input.
Any component that uses
Floating Menu
Focus wrap should work with the code provided on the website's demo code. The focus wrap does not work if you copy and paste the code in to another system and even the Carbon code pen demo does not work as expected.
Chrome, Safari, Firefox
v10.4.1
Watson Health Design Pattern & Asset Library; Release date coming up is end of Q3
Steps to reproduce the issue
Tab
Doesn't work as expected
https://codepen.io/team/carbon/pen/PgNGop
Works once I add in extra incorrect element
https://codepen.io/elizabethsjudd/pen/mNmZdR
The text was updated successfully, but these errors were encountered: