Replies: 1 comment
-
Turns out if you briefly give focus to the terminal and then take it way, that's enough to trigger the clearLiveRegion that is registered to the onBlur() handler. Something like: let active = document.activeElement; is enough to clear the live-region so that the screen reader works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have ARIA hinting turned on. When user types into xterm.js terminal directly, the AccessibilityManager updates a div
with the most recent updates from the terminal, so that a screen reader has a chance to announce them. The div gets cleared out every time that the user types another keystroke into xterm.js.
I have implemented a line-mode telnet client using xterm.js, and I provide my own text-line-editor widget. It submits text to xterm.js via the write/writeln methods, and this works fine BUT the write/writeln methods don't clear out the live-region div like typing into the normal xterm.js text entry does. The result is that after a few writeln's and some more terminal output, the AccessibilityManager puts "Too much output to announce, navigate to rows manually to read" into the live-region and then stops updating it.
I tried getting the live-region div element and clearing out its innerText directly, but it looks like there is also a line counter maintained internally by AccessibilityManager that tracks how full it is too.
Is there a way to tell the terminal component to flush out AccessibilityManager's live-region on-demand? Maybe with a synthetic keypress sent to <somewhere?> or other method?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions