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

Add aria-live: assertive for modals, polite for toasts #746

Merged
merged 1 commit into from
Nov 25, 2017

Conversation

limonte
Copy link
Member

@limonte limonte commented Nov 25, 2017

TLDR:

  • modal dialogs are important, announced them asap
  • toasts aren't so important, announce them in the order queue

According to the WAI-ARIA spec:

The values of this attribute are expressed in degrees of importance. When regions are specified as polite, assistive technologies will notify users of updates but generally do not interrupt the current task, and updates take low priority. When regions are specified as assertive, assistive technologies will immediately notify the user, and could potentially clear the speech queue of previous updates.

Usage notes from the WAI-ARIA authoring guide:

aria-live="polite"
Any updates made to this region should only be announced if the user is not currently doing anything. live="polite" should be used in most situations involving live regions that present new information to users, such as updating news headlines. -

aria-live="assertive"
Any updates made to this region are important enough to be announced to the user as soon as possible, but it is not necessary to immediately interrupt the user. live="assertive" must be used if there is information that a user must know about right away, for example, warning messages in a form that does validation on the fly.

@limonte limonte added the domain: accessibility A11y issues label Nov 25, 2017
@limonte limonte merged commit 6ca0d05 into master Nov 25, 2017
@limonte limonte deleted the feature/aria-live branch November 25, 2017 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant