扩展的咏叹调和咏叹调的扩展属性是否适用于< select />元素? [英] Does the aria-expanded and aria-haspopup attributes apply to <select /> elements?
问题描述
从W3C 维基
当作者使用可折叠内容时,例如,隐藏导航
菜单或内容列表时,触发链接或按钮应该为
指示屏幕阅读器用户,
以下的可折叠内容是处于展开状态还是处于折叠状态。aria-expanded
属性用于此目的。
这是否包含< select>
元素,或者仅用于导航项目?
select
元素可以接受任何全局 aria - *
属性以及适用于角色列表框的任何aria属性。
aria-haspopup
可以用于任何角色, aria-expanded
被允许用于列表框角色。
请注意,浏览器应该已经定义了默认隐式语义你o如果使用的是选择
控件的状态,则无需关心如何定义本地元素。
From the W3C wiki
When authors use collapsible content, for example, to hide navigation menus or lists of content, the triggering link or button should indicate to screen reader users whether the collapsable content below is in the expanded or in the collapsed state. The
aria-expanded
attribute is used for this purpose.
Does this include <select>
elements or is this only for navigation items?
The select
element can accept any global aria-*
attribute, and any aria attribute applicable to the role listbox.
aria-haspopup
is allowed for any role, and aria-expanded
is allowed for the listbox role.
Note that, the browser should already define the default implicit semantic so you do not have to care about defining an aria
attribute to define the state of the select
control if you're using the native element.
这篇关于扩展的咏叹调和咏叹调的扩展属性是否适用于< select />元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!