是“aria-haspopup"吗?属性主要用于工具栏菜单?

Is quot;aria-haspopupquot; attribute mainly for toolbar menu?(是“aria-haspopup吗?属性主要用于工具栏菜单?)

本文介绍了是“aria-haspopup"吗?属性主要用于工具栏菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到 aria-haspopup 属性被用于应用程序的工具栏菜单,例如 所见即所得编辑器.但是,我还没有看到它被用于任何 ARIA 演示网站的主导航.

I have seen aria-haspopup attribute being used on toolbar menu of applications such as WYSIWYG editor. However, I haven't seen it being used on the main navigation in any ARIA demonstration website.

这个属性主要是为应用程序的工具栏菜单引入的吗?在网站的主导航(有子菜单)上使用它是否合适合理?

Was this attribute introduced mainly for toolbar menu of applications? Is it appropriate and reasonable to use it on the main navigation (which has submenu) of a website?

推荐答案

刚刚看到这个属性被用在 jQuery UI Selectmenu(在a元素上,是选择菜单的开关).所以似乎可以在任何代码上使用它.

Just saw this attribute being used on the markup of jQuery UI Selectmenu (on the a element, which is the switch of selectmenu). So it seems to be okay to use it on any code.

<span class="ui-selectmenu-button css-scope">
    <a class="ui-corner-all ui-state-default ui-widget ui-button" href="#speed" tabindex="0" id="speed-button" role="combobox" aria-expanded="false" aria-autocomplete="list" aria-owns="speed-menu" aria-haspopup="true">
        <span class="ui-icon-triangle-1-s ui-icon"></span>
        <span class="ui-selectmenu-text">Medium</span>
    </a>
 </span>

这篇关于是“aria-haspopup"吗?属性主要用于工具栏菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:是“aria-haspopup"吗?属性主要用于工具栏菜单?

基础教程推荐