为什么屏幕读取器通过直接选择它们导航无线电 /复选框按钮?
我试图对WCAG友好,并创建了一组广播按钮,当他们收到换个方案时,触发动作。但是,当我尝试通过Shift+Arrow浏览它时,我发现它不仅会集中在它们,还要立即检查它们吗?我在这里错过了什么,还是正常的行为?
编辑:
例如,代码看起来像这样:
<input type="radio" name="month" value="jan">January</input>
<input type="radio" name="month" value="feb">February</input>
<input type="radio" name="month" value="mar">March</input>
I'm trying to be WCAG friendly and have created a group of radio buttons, which, when they receive on-change, trigger action. But when I tried to navigate it by shift+arrow, I discovered that it doesn't just focus them, but right away checks them on? Am I missing something here, or is that normal behavior?
Edit:
The code looks like this for example:
<input type="radio" name="month" value="jan">January</input>
<input type="radio" name="month" value="feb">February</input>
<input type="radio" name="month" value="mar">March</input>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有发布任何代码,因此我假设您正在使用
,并且其中有几个具有相同的
name
属性,并且每个广播按钮都具有与它们的正确关联标签。 (很多假设,但我们只能猜测您不发布任何代码。)当最初选择 no 无线电按钮时,不同的浏览器对它们进行了不同的处理导航。
选项卡 do 不选择“单选”按钮。它只会将焦点移动到那里。
一旦我的重点放在广播按钮上,箭头键就会执行两个行为:
听起来您要问#2 Behaivor。如果是这样,那么您看到的就是正常行为。
You didn't post any code so I'll assume you're using
and that you have several of them all with the same
name
attribute and that each radio button has a properly associated label with them. (Lots of assumptions but we can only guess if you don't post any code.)When no radio buttons are initially selected, different browsers treat navigation to them differently.
The tab does not select the radio button. It only moves the focus there.
Once my focus is on a radio button, then the arrow keys perform two behaviors:
It sounds like you're asking about #2 behaivor. If so, then what you are seeing is normal behavior.