我正在创建一个多项选择题练习,并且遇到了键盘可访问性问题。基本上,用户无法通过键盘循环浏览单选按钮列表。当“焦点”光标位于单选按钮上并且用户按下箭头键移动到下一个单选按钮时,会发生键盘陷阱。不是简单地聚焦它,而是选择单选按钮,从而显示答案。使用键盘浏览单选按钮时,如何停止选择单选按钮?
HTML标记:
<div id="contentWrapper">
<p class="instructions">Click on the correct answer.</p>
<ol start="49">
<!-- Start of multiple choice question -->
<li class="multipleChoice gradedQuestion">
<p class="question">If you receive a request for an extension from a trader, you should:</p>
<input type="hidden" name="questionNumber" value="49">
<ul>
<li>
<div class="answerOption"><label for="question49A">Refer to IP 13; if the original requirements are still being met, approve the extension.</label></div>
<div class="inputAndIdContainer"><input type="radio" name="question49" value="0" id="question49A"> A.</div>
</li>
<li>
<div class="answerOption"><label for="question49B">Refer to IP 20; if the original requirements are still being met, approve the extension.</label></div>
<div class="inputAndIdContainer"><input type="radio" name="question49" value="0" id="question49B"> B.</div>
</li>
<li>
<div class="answerOption"><label for="question49C">Refer to FW1; if the original requirements are still being met, approve the extension.</label></div>
<div class="inputAndIdContainer"><input type="radio" name="question49" value="1" id="question49C"> C.</div>
</li>
</ul>
<div class="feedback">
<div class="answeredCorrectly">Correct</div>
<div class="answeredIncorrectly">Incorrect</div>
<div class="answer">
<strong>Answer:</strong> C - Refer to FW1.
</div>
</div>
</li>
<!-- End of multiple choice question -->