cc-kv-terminal: reconsider the live region usage with the virtualizer
#1296
Labels
a11y
Related to accessibility
Milestone
virtualizer
#1296
Context
With #1292, we have added a virtualizer to handle the terminal output.
This is essential because some commands are very verbose (for instance running
command
) and we don't want the browser to crash because there are too many DOM elements.We want screen reader users to get the output of the command they run without having to move the focus between the prompt and output so we rely on a live region to do so (
aria-live="true"
+aria-atomic="true"
set on thevirtualizer
itself).Unfortunately, with the
virtualizer
screen reader users may face unexpected & disturbing behaviors:Ideally, the live region should only be triggered when we output the command result and that's it.
Potential solutions
virtualizer
and create a visually hidden area that would contain the live region. When we receive command output, we inject the raw text in the live region area.content-visibility
solution because we don't need as much perf as we do for the logs component here andcontent-visibility
offers a way better experience when it comes to a11y (DOM elements are present, they are just not "rendered" so you can set the live region on the output history area directly).The text was updated successfully, but these errors were encountered: