[英]Is there any way for aria-live=“assertive” without role=“alert” on Firefox?
[英]Accessibility: JAWS doesn't pronounce aria-live polite or assertive for *ngIf
我正在使用 Angular,每當下面代碼中的isVisible
變為真時,下面的 html 代碼就會呈現在頁面上。
<div *ngIf="isVisible">
<span aria-live="assertive" aria-atomic="true">Read this new text</span>
</div>
每次呈現時(可以根據行為刪除和添加幾次),我需要 JAWS 來發音跨度中的文本: Read this new text
。 為此,我嘗試使用 aria-live="polite" (不發音)甚至 aria-live="assertive" 甚至 aria-live="assertive" 和 aria-atomic="true" 基於這個Aria - 在 chrome 問題上刪除元素時,實時區域不會讀取更新。
如何讓它發揮作用? 使用:JAWS,谷歌瀏覽器。
添加或刪除活動區域效果不佳,您應該只操作此類區域的內容。
<div aria-live="assertive" aria-atomic="true">
<span *ngIf="isVisible">Read this new text</span>
</div>
assertive
是否是正確的選擇應該非常仔細地考慮。 這對用戶來說是相當具有破壞性的。 大多數時候polite
是更好的選擇。
當區域被指定為自信時,輔助技術將立即通知用戶,並可能清除先前更新的語音隊列。
另一個一般性建議是,發布的信息也需要根據用戶的條件輕松訪問,以防他們錯過或不理解。 一個字段的錯誤消息應該通過警報來宣布,但也應該綁定到輸入字段,以便在用戶每次關注該字段時讀取。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.