如何让VoiceOver屏幕阅读器使用单选按钮,说出适当数量的选择

时间:2016-05-24 14:35:39

标签: radio-button voiceover screen-readers

使用适用于iPad的Apple的屏幕阅读器VoiceOver时,在以下单选按钮组中,它会将其显示为,"标称,单选按钮,未选中1和1中的#34; 。我希望它能够将其读作" Nominal,单选按钮,未经检查的1 of 3" ,以反映正确的选择数量。



.col-md-12 {
  background-color: white;
  padding: 1em;
  margin: 1em;
}
input.radio-float {
  float: left;
  padding-right: 1em;
}
label.radio-float {
  max-width: 24em;
  padding-left: 1em;
  color: maroon;
}
span.radio-float {
  max-width: 24em;
  padding-left: 2em;
  color: gray;
  display: block;
}

<div class="col-md-12 form-inline">
  <fieldset id="FilterLevel">
    <legend>Please choose a filter level</legend>
    <input class="radio-float" id="FilterLow" name="FilterLevel" required="required" type="radio" value="LOW">
    <label for="FilterLow" class="radio-float">Nominal:</label>
    <br>
    <span class="radio-float">This level will catch most, but not all incoming spam. It is the safest selection if you are concerned about legitimate mail being inadvertently intercepted.</span>
    <br>

    <input checked="checked" class="radio-float" id="FilterMedium" name="FilterLevel" type="radio" value="MEDIUM">
    <label for="FilterMedium" class="radio-float">Aggressive:</label>
    <br>
    <span class="radio-float">More spam will be caught. There is a slight chance that legitimate mail may be blocked.</span>
    <br>

    <input class="radio-float" id="FilterHigh" name="FilterLevel" type="radio" value="HIGH">
    <label for="FilterHigh" class="radio-float">Very Aggressive:</label>
    <br>
    <span class="radio-float">This level should catch almost all spam. However, there is an increased risk that legitimate mail may be blocked. Use with care.</span>

  </fieldset>
</div>
&#13;
&#13;
&#13;

问题在于,我试图保持<span class="radio-float">缩进的一切似乎打破了VoiceOver识别无线电组中选项数量的能力。

  • 有关导致VoiceOver从&#34; 1 of 1&#34; &#34; 1 of 3&#34; 的任何想法?
  • 对于奖励积分,您能想出一种让Voi​​ceOver高兴并保留缩进的方法吗?

1 个答案:

答案 0 :(得分:2)

问题似乎是&#34; display:block&#34;。当VoiceOver遇到这种情况时,它会将其视为一个&#34;墙&#34;,并且没有看过它以检测到该组中还有其他单选按钮。将其更改为&#34;显示:inline-block&#34;但是这样可以解决这个问题,并且仍允许您在说明的左侧应用填充/边距。