WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA Polite VS Assertive

for

From: Mark Magennis
Date: Apr 13, 2022 8:53AM


That's funny, I very rarely use polite. I guess it depends on how you judge the importance. But one issue with polite that you should be aware of is that it may queue messages and read them all at once when it gets a chance. This can be a disaster. For example, if you have a "remaining characters" count for a text input field. Putting the number in an assertive live region usually works quite well because it starts of with "remaining characters: 250" and as the user types, every now and then when they pause it says "243", "227", etc. But if you use aria-live="polite" it may wait until the user pauses and then blurt out "249 248 247 246 ...". Can be a pain. It depends on how fast the user types, how long they pause, etc. but usually an assertive region works best. Probably better still is scripting to only read out at intervals, say 250, 200, 150, 100, 50, 20, 10, 5, 1 but that's more dev effort.

So what's best often depends a lot on the nature of the task, e.g. chat vs. remaining character count

Mark