-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Add dialog role to editor find widget #172979
Conversation
Thanks for the contribution, it looks great to me. @meganrogge is now driving our accessibility story in editor along with @isidorn , let's put together a plan item for March, in case I don't get a chance to review and test this PR. |
1 similar comment
Thanks for the contribution, it looks great to me. @meganrogge is now driving our accessibility story in editor along with @isidorn , let's put together a plan item for March, in case I don't get a chance to review and test this PR. |
Hi @meganrogge and @rebornix, it's been a while so I merged and verified that this PR is still producing the same behavior shown above. There did not appear to be any conflicts. Thanks! |
Adding this to June milestone so we make sure to take this into account for next milestone planning @meganrogge |
Tested locally and this is working great. Thank you @jjaeggli |
This addresses adding semantic labels to the non-modal "Find" dialog. See issue #172861 The biggest issue this addresses is that the "Close" button had no programmatic relationship with the dialog and therefore it was unclear that the control was associated with the dialog from a screen reader perspective. Adding the dialog role provides grouping for all controls within the dialog. Additionally, this moves the close button out of the find
find-part
element. The reason for this is thatfind-part
represents a semantic group of controls which are associated with the find input. The close button relates to the dialog, but not to the associated form group, therefore needs to be outside of this element. For issues related to programmatic grouping of input controls see #167885.This uses absolute positioning of the close control to be consistent with other cases where the controls are positioned outside of the usual flow. Not using flex hurts me just a little bit, but this maintains pixel perfect layout when compared to the previous version. Tab order of the control is also unchanged. This changes the screen reader output as tested in the following screen readers:
VoiceOver
this change
<tab to close button>
<tab to exit dialog, shift tab into dialog>
orig
<tab to close button>
<tab to exit dialog, shift tab into dialog>
NVDA
this change
<tab to close button>
<tab to exit dialog, shift tab into dialog>
orig
<tab to close button>
<tab to exit dialog, shift tab into dialog>
JAWS
this change
<tab to close button>
<tab to exit dialog, shift tab into dialog>
orig
<tab to close button>
<tab to exit dialog, shift tab into dialog>