WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: CSS Live Region

for

From: Patrick H. Lauke
Date: Jul 30, 2024 9:55AM


On 30/07/2024 15:46, <EMAIL REMOVED> wrote:
> My consulted Gemini.

A small "can we stop this kind of crap answer? If you don't know the
answer, asking some spicy autocomplete instead won't help capture the
actual nuance required". This isn't "let me AI this for you" as a
service here...

And indeed, while the short answer here is that no, you wouldn't
normally call it a live region, the fact that your currently focused
element is dynamically changing will have repercussions for whether or
not assistive technologies will announce the change. Just setting
`aria-pressed` here is not necessarily the answer either, as you then
get into weird double-negative-style announcements as well. See Have a
read through https://sarahmhigley.com/writing/playing-with-state/

And yes, one "trick" to make the dynamic change of the label for the
currently focused control announce consistently sometimes *does* involve
making the control itself a tiny live region. See
https://adrianroselli.com/2020/12/be-careful-with-dynamic-accessible-names.html

P
--
Patrick H. Lauke

* https://www.splintered.co.uk/
* https://github.com/patrickhlauke
* https://flickr.com/photos/redux/
* https://mastodon.social/@patrick_h_lauke