![](/img/trans.png)
[英]How to hide ARIA-LIVE from screen readers but make they will can read content inside?
[英]How do screen readers handle nested aria-live with aria-atomic
如何將屏幕閱讀器處理的情況下,你必須與元素aria-live
和aria-atomic
另一個元素里面有aria-live
和aria-atomic
的嵌套元素內和含量的變化?
它會讀取兩個部分,還是兩次讀取嵌套部分?
HTML:
<div aria-live="polite" aria-atomic="true">
Here is some text, <span>this itself may change</span>. It is a large section of the page
<div aria-live="polite" aria-atomic="true">
This is another part of the page that may change, it is also large. <span>This part may change too</span>
</div>
</div>
我問的原因是因為我正在使用AngularJS制作需要與ADA兼容的SPA。 該站點具有嵌套的布局方案,其中頁面的內部部分將被更改而不更改外部部分,但是外部部分可能會改變一個點。 理想情況下,當它更改時,我只希望讀取內部部分。 當外部部分更改時,它將全部讀取一次。
抱歉,它是特定於API的:
Table of document change scenarios and events to be fired in each API Scenario MSAA + UIA Express event MSAA + IAccessible2 event ATK/AT-SPI event Mac OS X Notification When text is removed EVENT_OBJECT_LIVEREGIONCHANGED IAccessible2: IA2_EVENT_TEXT_REMOVED text_changed::delete If in a live region, AXLiveRegionChanged When text is inserted EVENT_OBJECT_LIVEREGIONCHANGED IAccessible2: IA2_EVENT_TEXT_INSERTED text_changed::insert If in a live region, AXLiveRegionChanged When text is changed EVENT_OBJECT_LIVEREGIONCHANGED IAccessible2: IA2_EVENT_TEXT_REMOVE text_changed::delete If in a live region, AXLiveRegionChanged and IA2_EVENT_TEXT_INSERTED and text_changed::insert
建議的aria-atomic
行為:
用戶代理應該檢查祖先元素鏈中的aria-atomic =“ true”。 如果找到,則用戶代理應將RELATION_MEMBER_OF關系設置為指向設置aria-atomic =“ true”的祖先。
aria-live
行為也是:
用戶代理應該確保正在運行的輔助技術可以在刪除之前接收到有關刪除節點的通知。 這允許諸如屏幕閱讀器之類的輔助技術返回被刪除的相應DOM節點。 這對於其中搬遷很重要的生活區域很重要。 例如,屏幕閱讀器將要通知用戶另一個用戶已離開聊天室。 MSAA中的事件為EVENT_OBJECT_HIDE。 對於ATK / AT-SPI,這將是children_changed :: remove。 在Mac OS X中,該事件是AXLiveRegionChanged。 這還要求用戶代理在可訪問性API通知中提供唯一ID,以標識要刪除的唯一節點。
參考
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.