-
Notifications
You must be signed in to change notification settings - Fork 303
Tweak language around modal dialogs #4381
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
Conversation
✅ Deploy Preview for wcag2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@mbgower As I understand it, the extension of the text is meant to prevent people from failing modal dialogs where the focus ring includes the browser chrome (e.g. the URL field) which does not seem problematic. Is that the only point where you feel it gets confusing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heya, @patrickhlauke / @mbgower, how about these tweaks?
Co-authored-by: Adam Page <adam@adampage.net>
Co-authored-by: Adam Page <adam@adampage.net>
Co-authored-by: Adam Page <adam@adampage.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the Focus Order update, I would prefer the text about being able to cycle through the user agent controls be reinstated, alongside the edit, so that it's clear that that behavior is okay.
@fstrr should we split the difference and maybe add a parenthetical somehow that reintroduces this? a la
|
as discussed in today's WCAG 2.x backlog call, I've made that change @fstrr |
a dialog opens and focus is set within the dialog. As | ||
long as the dialog is open, focus is limited to the elements of the dialog. When the | ||
long as the dialog is open, all web page content outside the dialog becomes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this section say something slightly different to the APG modal dialogs pattern keyboard interaction section?
My personal view is that the APG needs to be changed to avoid focus being locked into the modal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APG is only a best practice suggestion, one way to implement a modal, and generally what the keyboard behaviour would be. it's not binding, and the revised wording here takes account of the fact that there are other valid implementations - like a <dialog>
element - where browser UI will also still be within the focus order.
otherwise, this may suggest that native <dialog>
fails WCAG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve heard anecdotally that one of the reasons the WHATWG chose not to trap focus in the <dialog>
element is because that behavior has been used maliciously to extract sensitive information from vulnerable users.
Because of that, I’ve been tempted to submit a PR to APG updating its ARIA dialog implementation to follow suit. There’s an open (but 3 years stale) discussion about this here: w3c/aria-practices#1772. I’ve looked around for a paper trail on that WHATWG decision but haven’t been able to find anything.
tabbing from the last control in the dialog takes focus to the first control in the | ||
dialog. The dialog is dismissed by activating the Cancel button or the OK button.</dd> | ||
Cancel and OK. When the dialog has been opened, all web page content outside the dialog becomes | ||
inert and cannot receive focus (though, depending on implementation, the focus cycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue as above
@adampage please take this up with the APG #4381 (comment) |
Closes #4185
Note that this only softens/expands some of the example language in the understanding documents. The original issue #4185 seems to conflate non-normative examples in a non-normative document with requirements of how modal dialogs should be implemented ... they are not. They provide examples of appropriate focus order and absence of keyboard traps. They are not the only ways in which focus order or absence of keyboard traps can be achieved. Examples are non-exhaustive, and there is no need - in my view - to expand these further to specifically address variations that result from different behaviours related to
<dialog>