简体   繁体   English

从屏幕阅读器隐藏Aria-live(礼貌)内部div中的内容更改

[英]Hide content changes in div inside Aria-live ( polite ) from Screen readers

I have a div inside a aria-live region that's only for sighted users. 我在一个咏叹调活动区域内有一个div,仅适用于有眼光的用户。 Changes to that div shouldn't be announced in screen readers. 该div的更改不应在屏幕阅读器中宣布。 I have tried using 我尝试使用

  • aria-hidden ARIA隐藏
  • role = presentation 角色=介绍
  • aria-live="off" ARIA活=“关”

IE and Firefox still read the changes. IE和Firefox仍会读取更改。 Chrome works fine. Chrome可以正常运行。 Pointers to deal with this issue is appreciated. 赞赏处理这个问题的指针。

First off, any content or functionality available for sighted users should be available as is or in an equivalent format for screen reader users as well. 首先,视障用户可用的任何内容或功能都应按原样提供,或以等效格式提供给屏幕阅读器用户。 Second, if for some reason you are hiding content from Screen readers then it should not be within a aria-live region. 其次,如果出于某种原因要在屏幕阅读器中隐藏内容,则该内容不应在现场直播的区域内。 aria-live exposes dynamic content changes to Assistive technologies. aria-live将动态内容更改暴露给辅助技术。 Try removing aria-live=""(polite/off etc.) from the code and add aria-hidden="true"(the element and all of its descendants will be hidden to Assistive technologies). 尝试从代码中删除aria-live =“”(礼让/关闭等),然后添加aria-hidden =“ true”(该元素及其所有后代将对Assistive技术隐藏)。

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

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