我有一个看起来像这样的旋钮:
<input type="number" name="amountMonthly" id="amount-monthly_0" class="formInput" required="required" tabindex="70" aria-describedby="amountMonthlyInfo" aria-labelledby="amountMonthlyLbl">
使用屏幕阅读器(我使用NVDA)时的预期行为是让它读取标签一次,并在旋转按钮中每次更改时读取新值。以下是在两个不同浏览器上以三种状态读取此元素的方法。
FIREFOX: Empty field selected (in focus)
[label] spinbutton invalid entry required [description] edit blank
FIREFOX: press up button (increment)
[number on screen]
FIREFOX: selected the entire numerical value (call it num)
[first length-of-num characters of label] selected
CHROME: Empty field selected (in focus)
[label] spinbutton editable invalid entry required [description] [label]
CHROME: press up button (increment)
[label]
CHROME: selected the entire numerical value (call it num)
[first length-of-num characters of label] selected