-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Post visibility panel better keyboard interaction #1885
Comments
Hi @afercia, I'm wondering about closing the panel on blur. Non-visual users who tab out of a panel may not realize they're exiting the panel until they've become more familiar with the interface, and may be frustrated if they have to manually tab back and open the previous panel section again. I could also see the case where a sighted keyboard-only users want to visually check all their settings in the sidebar before saving their post, and closing the panels on blur would require them to check each one manually. |
Hi @dpersing With this PR, when the popover closes on blur, focus is moved back to the toggle that opened it (the "Public" button in the screenshot above) and the toggle will have an If only the design was a bit different, we could probably try to make it a real dialog: adding a role dialog, constraining tabbing inside the dialog, etc. However, a dialog would need a "Save" or "Close" button because it requires explicit user interaction to complete the task. I'd consider two options, any feedback and new ideas very welcome. 1 2 Personally, I'd prefer 1, but that would require consensus on the slightly modified design. /cc @mtias Maybe I'm biased, but ^^ looks even better to me. |
Ah ha @afercia ! 😄 That makes a lot more sense. Thank you for the clarification! I think closing that popup on blur totally makes sense; visually it looks like a tooltip, which I'd expect to close on blur. That said, sending focus back to the control that launched it might be unexpected, if it closes while a user is just tabbing forward. I would expect focus to just move to the next control in the main panel if I tabbed out of the popup. Typically we (SA) recommend managing focus for tooltip-type interactions by sending focus to the tooltip container or the first element in it when it opens so users can immediately interact with it, but then letting the focus order progress naturally and closing the tooltip when a user tabs out of it to the next element on the page. For modal-type interactions (which the Close control would indicate), we do recommend sending focus back to the control that activated it, since the user is explicitly exiting the interaction, but also keeping focus in the modal/browser chrome until its dismissed. This interaction doesn't feel as "urgent" as a modal would usually indicate, since it's not taking over, if that makes sense? |
Note: as mentioned in #1886 (comment). there is an issue with Safari+VoiceOver that's still to address. |
@afercia Nice work :) Joe w/Simply Accessible here. I tested the PR and things are working very well! The only thing I noticed missing was the recommendation @dpersing made regarding sending focus to the tooltip container or the first focusable element in the tooltip when activated. The tooltip content is next in the DOM but it would communicate a change in the UI if focus was managed programmatically there. If you do shift focus programmatically there, I'd recommend consideration of converting the
SA generally recommends that links be used for navigation to sections of same page content or new urls, and buttons for submitting data or making a change to the UI. |
@joe-watkins thanks. I'm always a bit wary of moving focus. In this case, moving focus to the "popover" container or first focusable element would make the |
@afercia Sounds good! Since the "popover" is next in line within the DOM it sure is discoverable. Wish I could help w/Safari VO bug.. that is an odd one! |
Yep, we discourage its use since... http://www.heydonworks.com/article/aria-controls-is-poop 😂
Indeed! Any friends at Apple? 😉 |
Closing in favor of #2306 |
Splitting this out from #1312 and #1361.
The Post Visibility panel in the sidebar has room for keyboard interaction improvements. There are 3 points emerged during discussion on #1361.
The text was updated successfully, but these errors were encountered: