仅在JAWS 18 + IE 11中存在一个问题(在Chrome,Firefox和NVDA中运行正常,并且仅使用键盘,没有屏幕阅读器即可。)
这有效:
<ul class="user-options">
<li>
<button id="fa_lo" tabindex="0" class="step-one-button" aria-label="Question one header question one answer one">
<span>question one answer one</span>
</button>
</li>
<li>
<button id="fa_ci" tabindex="0" class="step-one-button" aria-label="Question one header question one answer two">
<span>question one answer two</span>
</button>
</li>
<li>
<button id="fa_in" tabindex="0" class="step-one-button" aria-label="Question one header question one answer three">
<span>question one answer three</span>
</button>
</li>
</ul>
但这不是:
<ul class="user-options">
<li>
<button id="h_no" tabindex="0" aria-label="Question Two Header Question two answer no" class="step-two-button">
<span>Question two answer no</span>
</button>
</li>
<li>
<button id="h_yes" tabindex="0" aria-label="Question Two Header Question two answer yes" class="step-two-button">
<span>Question two answer yes</span>
</button>
</li>
</ul>
您可以按Tab键进入第二组按钮,但它不会宣布文本,按Enter键或空格不会执行任何操作。如果我看不到任何差异,那么第一套就可以正常工作,但是第二套就没有问题。
它将与CTRL + Enter或Shift + Enter一起使用,但是我们的辅助功能团队不接受。它应该只使用Enter键或空格键,而没有修饰键即可。
答案 0 :(得分:-1)
<div role="application">
<ul class="user-options">
<li>
<button id="h_no" tabindex="0" aria-label="Question Two Header Question two answer no" class="step-two-button">
<span>Question two answer no</span>
</button>
</li>
<li>
<button id="h_yes" tabindex="0" aria-label="Question Two Header Question two answer yes" class="step-two-button">
<span>Question two answer yes</span>
</button>
</li>
</ul>
</div>