-
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
AVT 3 - Modal React Component: iOS Focus Trap #2739
Comments
@snidersd I'd like to get your opinion on the close button being the first button. In WH we moved the close button to be the last item in the modal because it didn't make sense to us to have the close button first... the user hasn't even read the content and they are focused on the button to close it? We felt having the modal be the first focused item so they were informed of the heading and then could navigate through the modal then they would reach the close button was a more accurate workflow. Thoughts? |
@elizabethsjudd Modal accessibility is not a one size fits all, but I do see that the React Modal Components do not follow the ARIA Authoring Practices Guidelines. It's interesting that the Vanilla Components place the focus correctly, but the React components do not. The default Modal & the passive Modal should have the focus on the Primary button. The Input Modal should have the focus on the first input field in the Modal. |
@dakahn Please add the react label to this issue. Thx! |
@dakahn This issue needs to be added to the IBM Carbon Copy Milestone |
@snidersd getting to this now. Just want to make sure we're testing against the same thing. I'm looking at our transactional modal here. I'm researching a fix for specifically trapping the screen reader's virtual cursor. Here's the article I'm referencing. Specifically the section "Updates to ARIA and using It seems to say that Looking at our Modal component I see that we have |
@snidersd doing further research on this -- it seems like Webkit browsers currently do not support the From this article by The Paciello Group: The native dialog element, what’s the hold up?: 🤔 Not sure how we would implement this feature from the library side though. ref: Webkit bugzilla issue requesting |
We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions. |
Just tested using VoiceOver on Safari in iOS at https://carbondesignsystem.com/components/modal/code and although browser focus was trapped to the modal -- I was able to leave the modal using VoiceOver and focus unseen links for frameworks behind the modal. Reopening for now while I investigate further If this is specific to the vanilla implementation we can change the ticket title, haven't had a chance to test using the env you describe for react tho @asudoh @snidersd you had a sandbox where modal was tested, if I'm not mistaken which is how we ended up opening this ticket, right? |
Thanks @dakahn - I can see the issue at https://carbondesignsystem.com/components/modal/code, too. |
Well, tried to access https://carbondesignsystem.com/components/modal/code with my iPhone with VO now, and somehow I can no longer reproduce the issue. I cannot reproduce the issue at the-carbon-components.netlify.com, either. Not sure what may have changed in the website, though. @dakahn Can you still reproduce the issue? |
I don't have reliable access to ios -- @snidersd can you confirm this for us if you have a chance? |
@dakahn If I test the modal in CodePen https://codepen.io/team/carbon/full/QPNEOv/, I no longer see a failure but testing the modal example at https://carbondesignsystem.com/components/modal/code it fails. |
could be our Story implementation of modal. I'll dig in and report back with whatever I can find 👍 |
Tested in iOS 13.3 Website: Codepen: You are also still able to navigate outside of the modal and the first item announced is "primary button" however this time you can see the buttons. @snidersd can you confirm |
@dakahn Looking at the input modal and the transactional modal I'm seeing the same issue as @aledavila, after the close button is pressed the focus is still in the modal. Also when navigating backward, the focus moves out of the modal while it is still open. |
Next steps before starting work (good catch @tw15egan) to verify before starting work:
|
Just checking in on this and I was unable to reproduce the issue on iOS 14.4. The focus was trapped correctly inside of the Modal, and when the Modal was closed focus was not retained in the modal content. Is anyone able to test on iOS 13? Otherwise, we can close this issue as resolved. |
It looks like this bug still exists, but has changed somewhat. The trap works backwards, but not forward through the focus ring.
😕 |
No longer able to reproduce running iOS 17.0.1 |
Environment
iOS 12.2
Safari & VoiceOver
Issue:
The text was updated successfully, but these errors were encountered: