简体   繁体   English

当焦点移动到单选按钮时,讲述人将错误信息宣布为“未选择”

[英]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它应该谈论选择 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.发生这种情况是因为它首先关注具有tabindex属性的div If you continue to the radio it will announce the correct status.如果您继续使用radio ,它将宣布正确的状态。 My fix was to remove the focus-ability from the div我的解决方法是从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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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