Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between aria-live="assertive" and aria-live="polite"

Tags:

wai-aria

Can somebody please elaborate on the difference between aria-live="assertive" and aria-live="polite"?

As per my understanding aria-live="assertive" will get the higher priority and wipe off the queue, whereas aria-live="polite" is having low priority over aria-live="assertive" and will continue with queue.

like image 420
user1996823 Avatar asked Dec 18 '14 11:12

user1996823


People also ask

What does setting aria live polite?

aria-live="polite" indicates that the screen reader should wait until the user is idle before presenting updates to the user. This is the most commonly used value, as interrupting the user with "assertive" might interrupt their flow.

What does aria live mean?

The aria-live attribute makes it possible for an AT (such as a screen reader) to be notified when error messages are injected into a Live Region container. The content within the aria-live region is automatically read by the AT, without the AT having to focus on the place where the text is displayed.

What is aria Live CSS?

The global aria-live attribute indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.

What is aria live and aria Atomic?

In ARIA live regions, the global aria-atomic attribute indicates whether assistive technologies such as a screen reader will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.


1 Answers

The behavior of live regions depends on the browser and screen reader being used, but you're on the right track.

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 practices 1.1:

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.

Regarding clearing the queue (also from the spec):

User agents or assistive technologies MAY choose to clear queued changes when an assertive change occurs.

like image 132
ckundo Avatar answered Nov 25 '22 22:11

ckundo