Domanda

How would a screen reader handle the case where you have an element with aria-live and aria-atomic inside another element with aria-live and aria-atomic and content changes inside the nested element?

Would it read both sections, reading the nested section twice?

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>

The reason I ask is because I am using AngularJS to make a SPA that needs to be ADA-compliant. The site has a nested layout scheme where inner sections of the page would be changed without changing outer sections, but the outer sections may change a one point. Ideally, I would want only the inner section to be read when it changes. When the outer section changes, it would read all of it, once.

È stato utile?

Soluzione

Sorry, it's API specific:

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 behavior is suggested:

User agents SHOULD check the chain of ancestor elements for aria-atomic="true". If found, user agents SHOULD set the RELATION_MEMBER_OF relation to point to the ancestor that sets aria-atomic="true".

aria-live behavior is as well:

User agents SHOULD ensure that an assistive technology, running in process can receive notification of a node being removed prior to removal. This allows an assistive technology, such as a screen reader, to refer back to the corresponding DOM node being deleted. This is important for live regions where removals are important. For example, a screen reader would want to notify a user that another user has left a chat room. The event in MSAA would be EVENT_OBJECT_HIDE. For ATK/AT-SPI this would be children_changed::remove. And in Mac OS X, the event is AXLiveRegionChanged. This also requires the user agent to provide a unique ID in the accessibility API notification identifying the unique node being removed.

References

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top