-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Consider conformance guidance for authors to explicitly declare autofocus for dialog element #7709
Comments
This seems like a good thing to require if we think that making web developers think about and make a decision about which element should have I'm not so worried about warning fatigue in this case, as long as the message in the conformance checker is understandable and explains the motivation for needing the There's some precedence: the |
Regarding the question of which issues in #4184 (comment) should be considered blocking for writing up a spec of https://github.com/whatwg/html/wiki/dialog--initial-focus,-a-proposal#initial-dialog-focus-logic : This is about whether to include a single sentence in the spec proposal there. And we have at least some positive support for including the sentence, from @zcorpan and the two thumbs-uppers. So I think we should call this resolved, and that sentence should be included in the PR. |
Great! How do I make a conformance requirement/guidance? Is there an example I could copy? |
This implements the changes proposed here: https://github.com/whatwg/html/wiki/dialog--initial-focus,-a-proposal#dialog-draft-text Specifically: 1. Add a parameter to dialog.show() called preventInitialFocus, which prevents the dialog focusing steps from running. 2. Make the dialog focusing steps look at sequentially focusable elements instead of any focusable element. There are additional open issues around dialog initial focus listed here: whatwg#4184 (comment) TODO add a conformance requirement about autofocus: whatwg#7709 TODO consider adding a <p class=XXX> for tab trapping: whatwg#7707
You can learn more about authoring conformance requirements here: https://html.spec.whatwg.org/#conformance-requirements-for-authors . Searching for "Authors should" in the spec will turn up a few examples of the type we're talking about. For this requirement in particular, I think it's about just keeping the sentence mentioned in the OP, when rewriting the dialog element introduction section. |
That sentence is now in the PR |
Per the dialog initial focus proposal, this unresolved comment has been moved here for further discussion:
Summary of exchange between Domenic and Aaron:
cc @sideshowbarker for thoughts on the matter
The text was updated successfully, but these errors were encountered: