简体   繁体   English

带有aria-live的可访问性Angular5

[英]Accessibility Angular5 with aria-live

We have an application on Angular 6 and have to implement accessibility. 我们在Angular 6上有一个应用程序,必须实现可访问性。 I added aria-live="polite" in angular-components, but Chromevox reader interrupts itself when data is loading. 我在角组件中添加了aria-live =“ polite”,但Chromevox阅读器会在加载数据时中断自身。 Because we're using sockets and get responses in random order. 因为我们使用套接字并以随机顺序获取响应。 Is it a solution to set the order in which reader should read components inner text? 设置阅读器阅读组件内部文本的顺序的解决方案吗?

Not sure what you mean by chromevox is "interrupting itself". 不确定chromevox的意思是“干扰自身”。 Do you mean it stops speaking? 你是说停止说话了吗 I would first check with JAWS and NVDA to see if it works well. 我将首先与JAWS和NVDA进行检查,以查看其是否运作良好。 Chromevox is a last resort for testing. Chromevox是测试的不得已的手段。 Lots of things work on JAWS/NVDA that don't work with chromevox. 在JAWS / NVDA上有很多工作与chromevox不兼容。

And just to make sure you're using it properly, aria-live should be used when you have components that are updating dynamically and you want those changes announced to screen readers. 并且为了确保您正确使用它,当您具有动态更新的组件并且希望将这些更改发布给屏幕阅读器时,应使用aria-live "Polite" is the right value for that attribute unless on the rare occasions you need the change announced immediately, then "assertive" should be used. “礼貌”是该属性的正确值,除非在极少数情况下需要立即宣布更改,则应使用“断言”。

Even less used should be role="alert" , which has an implicit aria-live="assertive" and also might tie in with the platform's alert messaging system and will often announce "alert" pre-pended to your change. 更少使用的应该是role="alert" ,它具有隐式的aria-live="assertive" ,并且可能与平台的警报消息系统配合使用,并且通常会在更改之前添加“ alert”。

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

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