w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.2k stars 335 forks source link

dismissing alerts #663

Open plweil opened 6 years ago

plweil commented 6 years ago

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.

mcking65 commented 6 years ago

@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.

plweil commented 6 years ago

@mcking65, thanks!