E-mail List Archives
CSS Live Region
From: Chase, DJ
Date: Jul 30, 2024 8:25AM
- Next message: Dean.Vasile@outlook.com: "Re: CSS Live Region"
- Previous message: David Engebretson Jr.: "Re: what ar any risks of making elements contenteditable"
- Next message in Thread: Dean.Vasile@outlook.com: "Re: CSS Live Region"
- Previous message in Thread: None
- View all messages in this Thread
Hi All,
If an interactive element's content changes with CSS based on the state of that element, is it considered a live region? And if so, what would be the best politeness setting for it?
I was thinking aria-live="off" aria-atomic="true" would be best, but Iâd love some input on this. The code is below if that helps.
HTML:
<details>
<summary <!-- aria goes here -->><span id="play">Play</span><span id="stop">Stop</span> game</summary>
<!-- the game -->
</details>
CSS:
details summary {
cursor: pointer;
}
/* closed — game stopped */
details play {
display: inline;
}
details stop {
display: none;
}
/* open — game playing */
details[open] stop {
display: inline;
}
details[open] play {
display: none;
}
Cheers,
--
DJ Chase
- Next message: Dean.Vasile@outlook.com: "Re: CSS Live Region"
- Previous message: David Engebretson Jr.: "Re: what ar any risks of making elements contenteditable"
- Next message in Thread: Dean.Vasile@outlook.com: "Re: CSS Live Region"
- Previous message in Thread: None
- View all messages in this Thread