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
[typo] focus should not necessarily be set to the **_first_** interactive element in the dialog #2241
Comments
I think it depends on the context whether first or primary is better. That's why I wouldn't be in favor of replacing first with primary. I would like to see an addition: "first or primary". Also, it could be explained when first and when primary makes sense. Justification: For example, the login pop up may have a drop down list for the application language or other relevant but not primary settings before the username input field. If these intial do not have focus, blind users will have difficulty recognizing that there are other form fields before the username input field. |
it might not even need to go to an interactive element at all, but to something like the first non-interactive heading in the dialog (for content-heavy dialogs, rather than dialogs that just contain mainly form controls) - see w3c/aria-practices#442 |
though it bears reminding auditors/developers that understanding document is non-normative, and the examples are just that...examples. non-exhaustive, and not necessarily binding. |
Indeed, these are examples. We could add a duplicate of that example which said "primary" instead of "first". It isn't prescribing what you have to do, it is an example of something that would pass. (NB: I don't think we should add a duplicate, that would just add text for very little benefit.) |
or change the example from suggesting a particular place for focus to land (first interactive? primary? somewhere else?) and just say that focus goes to the modal dialog and leave it as an exercise for the reader to work out what that means (the main thing is that it doesn't remain in the underlying page that triggered the modal, which is the usual problem we find) or yes, just leave it as is and educate authors/developers some more about what examples are intended to do |
It seems that the main point of this example is to move the focus to the dialog and to return it from where it was once the dialog is closed. How about changing from: When the trigger button is activated, a dialog opens and focus is set to the first interactive element in the dialog to: |
seems you agree with the comment of mine just before yours ;) so yes, that'd get my vote too |
@patrickhlauke yes, I agree! I wanted to suggest specific language to be specific about what that change would be. :) |
proposed response: It isn't a failure of Focus Order if, when a modal dialog is opened, focus isn't set to the first interactive element within the dialog. Focus does need to be set within the dialog. |
Regarding example in Understanding Success Criterion 2.4.3: Focus Order
https://w3c.github.io/wcag21/understanding/focus-order.html
Some auditors and developers are interpreting example no. 3 as a "requirement", that literally the "fist" interactive element should always receive focus first. That is not the intent of the SC and confuses the reader, since many times it is more desirable for the focus to be set on the primary interactive element. For example, on a log-in screen it would not be desirable for the focus to be set on a "cancel X button" that might appear at the top right of a dialog or page that redundantly includes a "Cancel" button at the bottom of the dialog or page when the primary purpose of the dialog is to enter some input such as a name, ID, or some other primary input.
Please change "first" to "primary".
The text was updated successfully, but these errors were encountered: