ARIA landmark role with aria-hidden set to true

ぐ巨炮叔叔 提交于 2019-12-01 06:58:47

问题


ARIA landmark role with aria-hidden set to true are also shown when user lists out the landmarks regions. ( While using JAWS: Jaws key + CTRL + ;)

Example:

<div role="region" aria-label="tools menu" aria-hidden="true">....</div>

Which is displayed only on a click of a button "Tools menu"

My question is,

  1. Is there a way such that this is not displayed when user lists out landmark roles?
  2. Jaws didn't announce that particular region is hidden when I got into that using landmark role. What could have gone wrong? i am using Jaws 12.0
  3. Is it working as expected?

回答1:


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>.



来源:https://stackoverflow.com/questions/15921724/aria-landmark-role-with-aria-hidden-set-to-true

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