WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: ARIA Polite VS Assertive

for

From: glen walker
Date: Apr 13, 2022 9:17AM


Yes, it certainly depends. On a "characters left" message, I never update
the live region on every character typed just like I don't update a
countdown timer on every second (assuming there is more than 10 seconds
left). It's really not much dev effort to get a nice effect. I usually
have two regions. One is visible and not live and is updated on every
keystroke or countdown timer second. The other is visually hidden
(sr-only) and is live (polite) and is updated periodically, such as after
every 50 keystrokes (if the characters left is a large number) or after
every minute (if there are several minutes left).

I then adjust the live updates as you get towards the end. With
keystrokes, if you're below 10 chars left, I'll update the live on every
keystroke. If there's a timer, then I'll update perhaps every 10 seconds
when it's under a minute left and maybe every second when there's 10
seconds left, or something like that. Is there a potential to hear
10,9,8,7... blasted at once? Maybe, but the advantages of everything else
working great outweigh the possibility of the one bad situation, in my
opinion.

But as I mentioned before, that's just my personal preference. There are
certainly other creative ways of handling this.