0

I have below dropdown list code which is generated using selectboxit js lib. JAWS is not reading the items in select list when focus in on the items. I have tried adding aria-label and title attributes on li, a , span and even i element but its still not reading. What attribute do i need to add so that JAWS can read it properly on focus. Focus is going properly on li element when up and down arrow is used.

<ul id="ddlSubReason_1SelectBoxItOptions" class="selectboxit-options selectboxit-list" tabindex="-1" role="listbox" aria-hidden="true">
   <li id="0" data-val="" data-disabled="false" class="selectboxit-option selectboxit-option-first selectboxit-selected" role="option" aria-label="">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span></a></li>
   <li id="1" data-val="29" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 1">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 1</a></li>
   <li id="2" data-val="28" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 2">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 2</a></li>
   <li id="3" data-val="55" data-disabled="false" class="selectboxit-option" role="option" aria-label="Selection text placeholder 3">
   <a class="selectboxit-option-anchor">
   <span class="selectboxit-option-icon-container">
   <i class="selectboxit-option-icon  selectboxit-container"></i></span>
   Selection text placeholder 3</a></li>  
</ul>

2 Answers 2

1

Posting the solution that worked for me which i found on this link - https://webaim.org/discussion/mail_thread?thread=6559

  1. Moved tabindex="0" into the surrounding span, since this should handle keyboard interaction.
  2. Added IDs and tabindex="-1" to all elements with role=option.
  3. Added aria-activedescendant to the container with role=combobox, which should be dynamically updated to point to the selected. (I was missing this particular point which fixed the issue for me)
Sign up to request clarification or add additional context in comments.

Comments

0

You have aria-hidden="true" on the parent container (<ul>). That will hide all children from the screen reader and nothing will be announced. Try removing it.

.<ul id="ddlSubReason_1SelectBoxItOptions" class="selectboxit-options selectboxit-list" tabindex="-1" role="listbox" aria-hidden="true">

2 Comments

Its still not working after removing aria-hidden. When I focus on Dropdown it reads all the options at once but when I focus on each option its not reading individual options on focus.
The code snippet in the OP works fine with a screen reader after removing aria-hidden. I had to add a dummy href to the <a> elements to make them keyboard focusable, but I was able to TAB to them and all of them were read. Without removing aria-hidden, they were not read.

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.