-
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
Clarify UX (keyboard) and further a11y expectations for modeless dialogs #7707
Comments
Related HTML AAM issue: w3c/html-aam#377 |
Further discussion from the explainer pertaining to keyboard behavior:
Related HTML issue concerning a native mechanism to navigate landmarks: #5813 |
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 : I don't think this is blocking. Modeless dialogs are challenging, but giving them the same focus semantics as modal dialogs seems like a reasonable starting point. (Plus maybe the mentioned additional ability of |
OK, I walk back that statement a little. This does block giving good advice in the conformance requirements section that was drafted at https://github.com/whatwg/html/wiki/dialog--initial-focus,-a-proposal#improving-conformance-requirements-and-examples . E.g. this issue is partially about what to substitute for that draft text where it says
and
Given how the current spec gives zero guidance on modeless dialogs, I think it would be tolerable to keep that state of affairs, and just have a That might be blocked on browser engineers giving a definite answer on whether they plan to implement a soft navigation trap of the sort discussed in the OP? I know Chromium has been wary of committing to that in the past, but it's probably worth a cross-browser discussion... I'll tag this as agenda+. |
It there's not already something in chromium that does tab trapping that we could copy, then yeah it would definitely require some work to build that functionality into FocusController. I don't think that's a reason to object to this though. |
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
We discussed this at the HTML triage meeting #8162. None of the implementers present were enthused about changing the behavior of modeless dialogs. It was noted that Even if removal is not feasible, another path would be to "deprecate" Of course, this might just be a failure of imagination and experience. Perhaps modeless dialogs are a thriving pattern on the web (separate from the pop-up use cases) and we just haven't been able to find good examples. Toward this end, we'd love any thoughts from web developers on how modeless dialogs should work, and how well In the meantime, the tentative plan is that when we expand the authoring guidance in #8199, we'll have a box saying something like
|
Would it be helpful if I added a console message when dialog.show() is called saying that we are planning to remove it and to come here if you'd like it to stay...? The only reason I don't want to remove it is because it's extra work for me when websites break, but if the use counter is truly below the accepted threshold or whatever then maybe it would be easy to remove. |
I think that would only be worth doing if the group (and ideally the larger community) was affirmatively agreed to try to kill Historically, Chromium had a removal threshold of 0.03%, but that has been abandoned in favor of case-by-case judgments. Still, it's a nice indicator, that 0.0012% is a decent bit below that. |
I wonder why exactly we're adding I recognize that https://github.com/whatwg/html/wiki/dialog--initial-focus,-a-proposal represents a lot of consensus-building work so I think the default path should be to keep that part of the proposal. But I am wondering if folks who were involved such as @aleventhal, @cookiecrook, @scottaohara, @mcking65, @jnurthen, etc. still believe |
|
Given the work on the pop-up API, which I believe is superior in a number of ways to modeless dialogs, I'm up for trying to deprecate |
Now that popover is out in 2 (and in progress in the third) engines, is it worth discussing again the idea of at least deprecating Edit: just noticed #9376 sorry. |
Per the dialog initial focus proposal, this unresolved comment has been moved here for further discussion. It's related to the topic of whether modeless dialogs should trap Tab key focus, but allow for users to navigate back and forth between the primary document and a modeless dialog or dialogs.
This issue could potentially replace issue 2171
@domenic:
@aleventhal:
@domenic:
cc @mcking65 and @jnurthen
There are likely clarifications that the ARIA working group could assist with here, and may result in additions to
role=dialog
andaria-modal
attributeThis is related to resolving ARIA issue 1284
The text was updated successfully, but these errors were encountered: