aria-live on textarea not working with JAWS

804 views Asked by At

I am using html textarea to simulate a command prompt. On typing a command command (e.g. ipconfig) and hitting Enter key, the command output gets appended to to the text. To read the output I have added aria-live="polite" attribute to the textarea which works fine with NVDA screen reader. However, JAWS on IE, starts reading from the top every time a command is entered. How do I make it read only the newly appended text like NVDA does?

So far I have tried aria-relevant="additions", role=log, role=alert attributes but nothing seems to work.

enter code here
<textarea id="commandPrompt" aria-live="polite"
     rows="5" cols="45" wrap="off" spellcheck="false">
</textarea>
1

There are 1 answers

0
QuentinC On

IN theory, you should be able to define precisely what should be read using aria-relevant and aria-atomic. Unfortunately, Jaws doesn't follow standards very well. These two attributes are known not to always work as expected with Jaws, depending on the browser used, the element to which they are applied, etc.

This is probably not the answer you wanted to have, but if Jaws doesn't do what you expect, the only solution is most likely to put the text to be spoken in another element. In a div or span you are much more mikely to have the expected behavior.