咏叹调具有里程碑意义的角色,咏叹调隐藏设置为 true [英] ARIA landmark role with aria-hidden set to true
问题描述
当用户列出地标区域时,也会显示 aria-hidden 设置为 true 的 ARIA 地标角色.(使用 JAWS 时:Jaws 键 + CTRL + ;)
示例:
<div role="region" aria-label="tools menu" aria-hidden="true">....</div>
仅在单击工具菜单"按钮时才显示
我的问题是,
- 有没有办法在用户列出地标角色时不显示?
- 当我使用里程碑角色进入特定区域时,Jaws 并没有宣布该特定区域是隐藏的.出了什么问题?我正在使用大白鲨 12.0
- 它是否按预期工作?
我对您在此处尝试执行的操作感到困惑.ARIA Landmark,允许使用辅助技术的人跳转到某些部分页面,因此他们无需通读页面即可找到特定区域.例如侧边栏,您可以添加 role="complementary"
,或使用 HTML5 标签.更多关于 HTML5 的信息 &PGB 的角色.
aria-hidden
属性有点违反直觉.所以如果我们有:
<p aria-hidden="true">我很酷的文字</p>
在代码中.浏览器将呈现:
<块引用>我很酷的文字
如果我们使用辅助技术查看相同的文本块,结果将是
<p></p>
由于您将地标和属性组合在一起,JAWS 不确定该怎么做.由于地标具有更多的权力/权威/任何东西,并且您说给我所有地标,它会看到它,并允许您在那里导航.但是,一旦你进入,它就会看到
.
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,
- Is there a way such that this is not displayed when user lists out landmark roles?
- 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
- 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>
.
这篇关于咏叹调具有里程碑意义的角色,咏叹调隐藏设置为 true的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!