Is “aria-haspopup” attribute mainly for toolbar menu?

 ̄綄美尐妖づ 提交于 2019-12-06 10:51:06

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/11169626/is-aria-haspopup-attribute-mainly-for-toolbar-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!