-
Notifications
You must be signed in to change notification settings - Fork 211
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
Throw/Manage focus when an overlay is open #710
Comments
@cuberoot and @adixon-adobe, et al I'm looking for usage of either the It is becoming clear that for accessibility's sake that the "click" type of overlay content should likely be split into two types of overlay content;
A more strict interpretation of the realities above would certainly add focus to the API surface to which we would need to expand. The three main question that could affect that are:
Particularly, the possibility of multiple tab stops in an Internal to the SWC library, we currently only leverage this API as part of the
I look forward to hearing how these APIs are currently being leveraged and how that might shape your thoughts on how we could bring these two issues to a resolution! |
Clarifications: @adixon-adobe that Search UI seems like a great challenge case to compare to the path we choose here. Would you and the team happen to have the keyboard accessibility requirements that you'd be applying to that in a place to share? It's likely that you're correct and this is something that should be manage manually, but the way that it's very close to this sample in the documentation of accessible modals, while also seeming like non-mainline interactions, makes it a very interesting case to understand in the context of what we're making here. Proposed Next Steps
Alignment?If that makes sense, please respond to or thumbs up this comment and I can start looking at getting that into a place for us to compare notes again next week sometime. PostlogAll of this should be non-breaking while offering benefits to existing elements like |
Alas we don't have any keyboard accessibility requirements for that UI yet (and it doesn't look like there is any in LrD I can steal). My assumption with this UI is that you'd be able to tab/arrow between the controls. It looks like depending on what's selected the overall either closes, or presents new options (like which camera to filter on). That definitely adds an extra wrinkle. What I will do is add a task to implement a simpler proof of concept. Overall though, this sounds great. 👍 👍 👍 @cuberoot / @charlessuh I'd love to get your thoughts here as well. |
Making some nice progress with the steps outlined above:
To-dos:
Thoughts? |
I've updated the links above to be more evergreen. And, you can now check out the "local" modal via: https://westbrook-overlay-focus--spectrum-web-components.netlify.app/storybook/iframe.html?id=overlay--deep-nesting Also, the more I looked at this, the more I needed to make sure that |
This is coming together really nicely in #728 and might be ready to go. Upon review of how this might work in a couple of other use cases I do have one possibly additional "mode" to consider. For "inline", we are actually doing something close to replacing the trigger with the overlay element; E0->T->E1 opens an overlay that then amounts to E0->Overlay->E1 and might be better called "replace" than "inline". This workflow support the "Dropdown" interface in I wonder if this should lead toward either or both of renaming |
@Westbrook This doesn't seem to be resolved. |
@jnurthen Do you have an example? It's always possible we've missing something, and we are very happy for the extra eyes. For instance the work outlined herein can be experienced by the following steps:
Or:
We're still tracking #764 separately as sadly it does seem to apply in more VO situations than just iOS. I'm actually reviewing next steps for our implementation of that right now, and hope to be able to get your eyes on it when it's close to ready! I've also just moved #866 into the repo from a personal list, which will further outline use cases and guidelines for the various API we now surface in this area. |
I'm looking at https://opensource.adobe.com/spectrum-web-components/components/dialog-wrapper/examples |
Yes. Those are element demos right now and not experience demos, which is to say they don't use this API. I'll add reviewing this page to the documentation task in #866. Thanks! |
When an overlay opens, the browser focus should be thrown into it. This means either the overlay itself or the first focusable item in the overlay should receive focus immediately by default. When this occurs the focus should flow through the overlay, and then be thrown back to the triggering element when focusable content has been fully stepped through. For instance, the
sp-dropdown
element should not need to throw focus into its options list when it opens, and once the list is exhausted (a single tab in this case for the floating tab index) the focus should return to the UI from which it came.related #709
The text was updated successfully, but these errors were encountered: