简体   繁体   English

是否应在传统的静态菜单(不使用JavaScript)上使用ARIA属性aria-expanded =“ true”?

[英]Should ARIA attribute aria-expanded=“true” be used on traditional static menus (no JavaScript)?

The shop GanzNormal.ch has sort of a main menu containing of two items: "Produkte (Products)" and "Hersteller (Manufacturers)". GanzNormal.ch商店有一个主菜单,其中包含两个项目:“产品(产品)”和“销售商(制造商)”。

It is augmented using ARIA: aria-haspopup and aria-expanded . 它使用ARIA进行了增强: aria-haspopuparia-expanded

I'm used to have ARIA on highly interactive JavaScript elements, but not on traditional links that do a page reload. 我曾经在高度互动的JavaScript元素上使用ARIA,但在进行页面重新加载的传统链接上却没有。 So I think it's not ok to use those attributes for this menu, as it offers only traditional links. 因此,我认为将这些属性用于此菜单并不可行,因为它仅提供传统链接。

I assume that the developers mainly searched for a way to convey the "selected/active" status of the items, but this isn't a proper way. 我认为开发人员主要是在寻找一种传达项目“已选择/活动”状态的方法,但这不是正确的方法。 I would assume the developers simply use a visually hidden text like "current item". 我假设开发人员仅使用视觉上隐藏的文本,例如“当前项目”。

What do you think? 你怎么看? Is it ok to set those ARIA attributes, or would it be better to remove them? 可以设置那些ARIA属性,还是最好删除它们?

Live site: http://www.ganznormal.ch/index.cfm?&content=2010&navi=20&spr=de 直播网站: http//www.ganznormal.ch/index.cfm?&content = 2010& navi = 20&spr = de

Those two buttons are acting as tabs (or as a radio button group), you should mark them up in that way. 这两个按钮充当选项卡(或单选按钮组),您应该以这种方式对其进行标记。 You can use the aria-selected="true" attribute to indicate which tab is the selected tab. 您可以使用aria-selected =“ true”属性指示哪个选项卡是所选选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM