将ARIA隐藏设置为true的ARIA标志性角色 [英] ARIA landmark role with aria-hidden set to true

查看:278
本文介绍了将ARIA隐藏设置为true的ARIA标志性角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户列出地标区域时,也会显示aria-hidden设置为true的ARIA地标角色。 (在使用JAWS时: Jaws键 + CTRL + ;



示例:

 < div role = region aria-label =工具菜单 aria-hidden = true>。 ...< / div> 

仅在单击工具菜单按钮时显示哪个



我的问题是,


  1. 有没有一种方法可以在用户列出地标角色时不显示?

  2. 当我使用具有里程碑意义的角色进入该区域时,Jaws并未宣布该区域是隐藏的。可能出了什么问题?我正在使用Jaws 12.0

  3. 它是否按预期工作?


解决方案

我对您要在此处执行的操作感到困惑。 ARIA地标允许使用辅助技术的人跳到某些部分页面上的内容,因此他们无需通读页面即可查找特定区域。例如,边栏,您可以添加 role = complementary ,或使用HTML5 < aside> 标记。 有关HTML5和更高版本的详细信息



aria-hidden 属性有点反感。因此,如果我们有:

 < p aria-hidden = true>我的炫酷文字< / p> 

代码。浏览器将呈现:


我的炫酷文字


如果我们使用辅助技术查看同一段文本,结果将像是

 < p> < / p> 

由于您要组合界标和属性,因此JAWS不确定该怎么做。由于地标具有更大的功能/权限/功能,您说给我所有的地标,它将看到它,并允许您导航到那里。但是,一旦您进入 ,它将看到< div>< / div>


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?

解决方案

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

这篇关于将ARIA隐藏设置为true的ARIA标志性角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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