0

I am trying to bind the selection state of button (selected or not selected) with aria-pressed or aria-checked property. But in none of the case sreen reader is announcing the value. I tried like:

 1. data-bind="attr:{'aria-checked': knockoutBooleanVar()}", role = "button"
 2. data-bind="attr:{'aria-pressed': knockoutBooleanVar()}", role = "button"

How can I achieve the screen reader announcing a selection state for the button?

1 Answer 1

0

The screenreader will only announce what is in focus, or what is in aria-live regions. If the button is not in focus, the state will not be announced by the screenreader.

You might consider setting up a (small) aria-live region for announcing state changes to controls which are not in focus. This may be useful for giving feedback about input validity or whatever.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.