以下是单选按钮的代码段。要求是屏幕阅读器应该读作“为了75,000美元的保险额,每月保费是29.80美元。单选按钮。“
<input class="form-input" type="radio" id="rb_0" name="insuranceOptionTab1" value="3">
<label class="form-label" for="rb_0"><span class="bold-one-click">$75,000</span> | $29.80</label>
我有什么方法可以在辅助功能中实现自定义消息。
答案 0 :(得分:0)
You can use the aria-describedby property to read the custom message to the user when using screen reader..
Nice example explained in the link
http://www.oaa-accessibility.org/examplep/checkbox1/
use the class .offscreen to hide the content from displaying the content on the screen
.offscreen {
position: absolute;
left: -200em;
top: -20em;
}