辅助功能问题:选择下拉元素是否需要通过选项卡才能在菜单中向上/向下移动?

发布于 2025-01-11 15:09:44 字数 380 浏览 0 评论 0原文

我一直试图找到这个问题的答案,但还没有得到明确的答案。我在我的应用程序中使用 MUI Select 组件,并注意到菜单项能够使用向上/向下键导航并使用 Enter 键进行选择,但无法使用 Tab 键向上/向下移动。这是可访问性的最佳实践,还是不是必需的?我还查看了此指南,这似乎不需要制表符。只是需要对此进行一些验证。谢谢你!

I've been trying to find an answer to this, but can't quite get a clear one. I'm using a MUI Select component in my app, and noticed that it the menu items are able to be navigated with up/down keys and selected with the enter key, but not able to go up/down with the tab key. Is this a best practice for accessibility, or is it not required? I also looked at this guideline, which seems like tabbing isn't required. Just want need some validation on this. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

指尖上的星空 2025-01-18 15:09:44

如果您指的是下拉菜单的不同选项,不,它们不应该通过 tab 访问。

据我所知,这可能更像是一种共同惯例或建议,而不是绝对义务。
它来自大多数操作系统上的本机 UI 控件/小部件/组件约定,这些约定在 Web 出现之前就已经使用了很长时间。

tab 键通常用于从一个控件转到下一个控件。
但是,当您浏览下拉菜单的不同选项时,您仍然使用相同的控件。
因此,下拉选项不必如此,甚至不应该通过 tab 键访问。

相同的答案适用于选项卡控件的不同选项卡或可选项目列表中的项目。通常,使用选项卡导航时,您应该只到达当前选定/活动的元素。再次按 Tab 键将移动到下一个交互式控件。

If you mean the different options of a dropdown menu, no, they shouldn't be reachable with tab.

This is probably more a common convention or a recommandation than an absolute obligation, as far as I know.
It comes from native UI control/widget/component conventions on most operating systems that have been in use long time before the web.

The tab key is normally used to go from a control to the next.
But when you go through the different options of a dropdown menu, you stay on the same control.
So dropdown options don't have to, and even really shouldn't be reachable with the tab key.

The same answer applies on the different tabs of a tab control, or the items in a list of selectable items. Normally when navigating with tab, you should only reach the currently selected / active element. Another press on tab key moves to the next interactive control.

不交电费瞎发啥光 2025-01-18 15:09:44

如前所述,TAB 的目标通常是从一个特定的输入控件移动到另一个输入控件,而不是在其中移动。因此,使用箭头键和 Enter 就可以了。然而,作为一名屏幕阅读器用户,我遇到过由于多种原因而无法正常工作的自定义“选择”框。即使键盘导航在屏幕阅读器上下文之外按预期工作。我不清楚您是否在屏幕阅读器下尝试过此操作。

As mentioned before, the goal of TAB is typically to move from a specific input control.to another, not within it. Thus, the use of arrow keys and enter is fine. However as a screen reader user myself, I run across custom "selection" boxes that fail to work properly due to many reasons. even if keyboard navigation works as expected outside of a screen reader context. It isn't clear to me if you tried this under a screen reader.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文