-
Notifications
You must be signed in to change notification settings - Fork 125
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
Should dialog/alertdialog be modal or non-modal by default? #1210
Comments
I think aria-modal=true for alertdialog would be ok, but not for dialog, because it has far-reaching implications:
Since the standard so far was aria-modal=false, I would leave it at that for role=dialog. Unless most UA+AT combinations already interpret this differently - can you share your test results for aria-modal? |
Can't share tests right now. But |
I think that's a bug in the browser and/or screen reader. Modals should be a very conscious decision by an author. They are disruptive; they interrupt the user's workflow and hijack the keyboard/page/app. Nonmodals are less offensive; they let users continue with what they were doing; they can be ignored. I think the missing value default for aria-modal should stay false. I suspect most component libraries (even on desktop) support nonmodal by default, and modal is an extra step, i.e. set a modal flag, or call openModal() or showModal() instead of open() or show(). @JAWS-test said:
Maybe? Right now in the alertdialog spec, it's in the prose as a SHOULD:
We could make that stronger by saying MUST, and maybe even by having the "Implicit Value for Role" say "Default for aria-modal is true". The trouble with defaulting to true, though, is that authors might not do the extra work to make it truly modal (tab trapping, etc) and so it might not really be modal, even though the attribute says it is. |
tests/results: https://scottaohara.github.io/testing/dialog-tests/ column 1 & 2 are marked as "??" because, right now, I do not think the specification is explicitly clear enough on if
Then i think we need to state that in the definitions for
This is the risk of all of ARIA though. :( |
We've seen a lot of authors use Since the effect of |
cc @aleventhal @jcsteh for any additional info here regarding current behavior |
Here are interesting notes I took on this issue from over year ago:
After reading some of the comments in the that PR, I'm thinking, maybe NVDA is doing the right thing. Basically, to keep the user inside the dialog by default, but let the user outside of it if they want. After all, as a sighted user, I can "see" outside of the dialog. FWIW, here is a GitHub issue to support aria-modal in NVDA, but it doesn't seem particularly clear to me nor tied to the rest of the community discussion: nvaccess/nvda#9122 |
I want to signal that I have concerns about this topic. Note, obviously not with you, Aaron, just with the current state of things. I suggest a dedicated call, because we absolutely will not cover this issue properly on the weekly calls. I’m happy to host with Zoom and make time for this.
I can bring a few dozen experiences across clients from small to huge to the table, but more importantly, I think we need a reasoned approach that does not depend on making assumptions or deciding on defaults. Can we just follow the spec? If the spec needs changing, let’s do that, but this is an untenable situation RE screen readers just deciding what they “feel” is the right way to do something, and it causes me a great deal of frustration when advising developers what to do.
|
Of course. Let's look to see if the spec needs updating, or just ATs. Happy to do a separate call but I feel that we need someone to represent NVDA, even if it's one of the community members in that PR thread. Otherwise, we might want to try for Reef, as Mick's time is hard to get. |
for the deep dive i have updated the testing results on the page I shared. just a few changes, but also added results for what narrator + edge are doing. |
Action items:
|
Testing has shown that some browser / screen reader combos will see the
dialog
role and treat it as modal by default, without the need foraria-modal=true
.In these same pairings,
aria-modal=false
doesn't appear to do anything to removal the "modalness"... which then effectively means that the attribute doesn't do anything at all... since without it, thedialog
is treated as modal... and with it set tofalse
it doesn't undo the modal behavior.But before I can file bugs, I think it's worth actually specifying whether these roles should be modal by default or not. I always assumed "not" by default....but....maybe there's validity to do that and meet current implementations/heuristics half way?
The text was updated successfully, but these errors were encountered: