简体   繁体   中英

Narrator announces incorrect information as "non-selected" when focus moves to the radio button

Narrator announces incorrect information as "non-selected" when focus moves to the radio button.

it should be speaking about radio button selected 1 of 2

 <div> <div tabindex="0" role="radio"> <ul> <li class="react-custom-radio-link"> <input type="radio" name="IsPrivateProfile" id="Public" aria-checked="true"> <label for="Public">Public</label></li> </ul> </div> <div tabindex="0" role="radio"> <ul class="react-custom-radio-button"> <li class="react-custom-radio-link"> <input type="radio" name="IsPrivateProfile" id="Private" aria-checked="false" checked=""><label for="Private">Private</label></li> </ul> </div> </div>

It happens because it focuses first on the div which has a tabindex attribute. If you continue to the radio it will announce the correct status. My fix was to remove the focus-ability from the div

 <div> <div role="radio"> <ul> <li class="react-custom-radio-link"> <input type="radio" name="IsPrivateProfile" id="Public" aria-checked="true"> <label for="Public">Public</label></li> </ul> </div> <div role="radio"> <ul class="react-custom-radio-button"> <li class="react-custom-radio-link"> <input type="radio" name="IsPrivateProfile" id="Private" aria-checked="false" checked=""><label for="Private">Private</label></li> </ul> </div> </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM