是“咏叹调 - 流行”吗?属性主要用于工具栏菜单? [英] Is "aria-haspopup" attribute mainly for toolbar menu?

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

问题描述

我曾在应用程序的工具栏菜单上看到 aria-haspopup 属性,例如所见即所得编辑器。但是,我还没有看到它在任何ARIA示范网站的主导航中使用过。



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

刚刚看到这个属性被用于 jQuery UI Selectmenu 标记(一个元素,它是selectmenu的开关)。因此,在任何代码上使用它似乎都可以。

 < span class =ui-selectmenu-button css-范围> 
< a class =ui-corner-all ui-state-default ui-widget ui-buttonhref =#speedtabindex =0id =speed-buttonrole =combobox aria-expanded =falsearia-autocomplete =listaria-owns =speed-menuaria-haspopup =true>
< span class =ui-icon-triangle-1-s ui-icon>< / span>
< span class =ui-selectmenu-text>中< / span>
< / a>
< / span>


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?

解决方案

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>

这篇关于是“咏叹调 - 流行”吗?属性主要用于工具栏菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆