javascript - aria-expanded 和 aria-haspopup 属性是否适用于 <select/> 元素?

标签 javascript html accessibility wai-aria

来自 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/

相关文章:

html - 悬停行时使图像在表格中旋转

java - 使用蓝牙键盘和语音助手的TextView按钮

javascript - 并行运行多个 Axios 请求以验证数据

javascript - 如何使用 JavaScript 从另一个页面更改一个页面的 CSS

javascript - express POST req.body 解析器为空

html - *自动换行 : break-word* and/or *overflow-x: scroll* not working inside flex item

google-maps - 什么是适合 map 元素的 WAI-ARIA 角色属性

android - 在 Android Talkback 可访问性中将缩写或缩写发音为单个字符

javascript - 使用 CSS 水平居中嵌入 HTML 中的 jQuery

javascript - jQuery/JS : Looking for a way to animate a cube in 3D perspective