Skip to content
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

dialog vs. alertdialog #1799

Open
benbeaudry opened this issue Sep 13, 2022 · 6 comments
Open

dialog vs. alertdialog #1799

benbeaudry opened this issue Sep 13, 2022 · 6 comments
Assignees
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Milestone

Comments

@benbeaudry
Copy link
Contributor

What's the actual difference between a dialog and a alertdialog?

An alertdialog is a subclass of dialog and should be modal, just like a dialog. Both roles expect the focus to be within the dialog. The only apparent difference is that an alertdialog should convey a message to alert the user. In practice, though, I think screen readers will just read out the content of dialogs even though there is no alert.

Can someone give me specific use cases for each?

@benbeaudry benbeaudry changed the title Dialog vs. AlertDialog dialog vs. alertdialog Sep 13, 2022
@aleventhal
Copy link
Contributor

Agree. It seems like any possible difference will be really minor.

I see this difference:

  • An alertdialog fires an alert event, so that the screen reader should read the entire thing.
  • A dialog does not, and the screen reader should read up to the first focus (hopefully all ATs do this).
    (In both cases, if aria-describedby/aria-description is set on them, then that should be read instead.)

If there are no other practical differences for the user, then perhaps we should deprecate alert dialog.

@scottaohara
Copy link
Member

another potential difference would be a role=dialog should be considered aria-modal=false by default, where as an alertdialog could be aria-modal=true by default.

#1210

@aleventhal
Copy link
Contributor

Weird, but ok. I would have thought the opposite maybe? :)

@scottaohara
Copy link
Member

@aleventhal maybe something else for us to talk out then. I'm curious as to why you'd think the opposite.

@JAWS-test
Copy link
Contributor

I guess the main difference is the behavior when the browser window doesn't have the focus.

  • When a dialog is opened, something just happens on the browser window in the background and this is not noticeable with AT.
  • if an alertdialog is opened, then an alert-message is sent, which makes the operating system output this message from the AT, even if the browser window is invisible in the background.

@aleventhal
Copy link
Contributor

@JAWS-test thanks, that's interesting.
@scottaohara we should test this to verify it is correct.

@jnurthen jnurthen added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Sep 22, 2022
@jnurthen jnurthen added this to the ARIA 1.3 milestone Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Projects
None yet
Development

No branches or pull requests

5 participants