-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Proposal: Add property to recursively hide elements from screen readers
Summary
Android (and C# RNW) supports importantForAccessibility="no-hide-descendants" to recursively hide an element and its children from screen readers. iOS has accessibilityElementsHidden=true, and web has aria-hidden=true, to accomplish the same thing.
React Native Windows (C++) should support a similar recursive property.
Motivation
When creating layered visual content (a slide out tray, a modal-like popup), often the background content should not be interactive or accessible while the foreground element exists.
If the foreground is completely opaque, this might be accomplished by not rendering the background at all. However, if any part of the background should remain visible (for example, through an acrylic panel in the foreground), another mechanism is needed to disable the interaction and screen reader access.
The "accessible=false" property allows this on an element-by-element level (in the case of RNW, it sets AccessibilityView::Raw), but it doesn't recursively apply this to children, which makes it a poor fit for hiding larger chunks of content.
Open Questions
- Should this use one of the existing properties (importantForAccessibility or accessibilityElementsHidden) or a new windows-specific property?