ARIA landmark role with aria-hidden set to true

南楼画角 提交于 2019-12-01 08:29:06

I am confused at what you are trying to do here. An ARIA Landmark, allows a person using assistive technology to jump to certain parts of a page, so they don't need to read through the page to find a specific area. For example a sidebar, you could add role="complementary", or use the HTML5 <aside> tag. More information on HTML5 & roles at PGB.

The aria-hidden attribute is slightly counter-intuitve. So if we have:

<p aria-hidden="true">My cool text</p>

in code. The browser will render:

My cool text

If we look at this same block of text with assistive technology, the result would be like having

 <p></p>

Since you are combining a landmark and an attribute, JAWS is unsure what to do. Since landmarks have more power/authority/whatever, and you say give me all the landmarks, it will see it, and allow you to navigate there. However, once you're in it, it will see <div></div>.

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