aria-practices icon indicating copy to clipboard operation
aria-practices copied to clipboard

dismissing alerts

Open plweil opened this issue 7 years ago • 2 comments

After reading through the alert and alert dialog patterns, I'm a bit puzzled. SInce an Alert cannot contain any controls, presumably it cannot be dismissed. Is it intended for alerts remain visible until the user leaves the page?

This sentence from Accessible Rich Internet Applications (WAI-ARIA) 1.1 is also puzzling:

If an alert requires focus to close the alert, then content authors SHOULD use alertdialog instead.

How else might one close and alert? I think it would make sense to provide for an button (which requires focus) to optionally close or dismiss the alert, but it seems to be outside of the spec. I can think of cases where this would be more desirable and simpler than going to an Alert Dialog, which is modal and must be dismissed.

If I am misreading any of these specs, please let me know.

plweil avatar Apr 24 '18 21:04 plweil

@plweil, sorry it has been almost 5 months with no response.

We discussed this topic in today's authoring practices task force meeting.

Your confusion is understandable. The group agrees we need to make changes to clarify the pattern and improve the examples. We see the need to demonstrate appropriate use of alerts having three different behaviors:

  1. An alert that is displayed as long as it is relevant and cannot be dismissed.
  2. an alert that is displayed until dismissed.
  3. An alert that disappears automatically.

In addition, we believe it would be helpful to compare and contrast these visual persistence behaviors with the alert dialog pattern. So, we are planning to experiment with the idea of adding alerts with each of the above three persistence behaviors to the alert dialog example page.

To address this issue, we will take 3 actions:

  1. Update the alert dialog example page.
  2. Revise wording of the alert pattern.
  3. Revise wording of the alert role in the ARIA spec.

When we have separate issues for managing and tracking the above actions, we will close this issue.

mcking65 avatar Sep 11 '18 03:09 mcking65

@mcking65, thanks!

plweil avatar Sep 20 '18 15:09 plweil