来自 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.
这是否包括<select>
元素还是仅用于导航项?
最佳答案
The select
element可以接受任何全局 aria-*
属性,以及适用于 Angular 色列表框的任何 aria 属性。
aria-haspopup
允许任何 Angular 色,并且aria-expanded
允许列表框 Angular 色。
请注意,浏览器应该已经定义了 default implicit semantic因此,如果您使用的是 native 元素,则不必关心定义 aria
属性来定义 select
控件的状态。
关于javascript - aria-expanded 和 aria-haspopup 属性是否适用于 <select/> 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40085027/