allowsDirectInteraction
Whether the accessibility node allows direct touch interaction while the screen reader is active.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Accessibility
- Assembly: UnityEngine.AccessibilityModule
public bool allowsDirectInteraction { get; set; }
Remarks
This property controls whether the node can be interacted with using standard gestures, bypassing the screen reader. This is useful for elements such as a piano keyboard, a drawing canvas, or gameplay that requires quick or complex gestures.
If this property is set to , the screen reader provides instructions on how to enable direct touch. The user can then directly interact with the user interface area corresponding to the node's _frame without the screen reader interfering.
trueIf this property is set to and the node does not have a _label, the screen reader announces the node as a "direct touch area".
trueGenerally, accessibility nodes should have this property set to to ensure that the screen reader can provide the necessary context and instructions to the user. Only set this property to in cases where the user experience would be significantly impaired by the screen reader's interference, and where the user can still understand and interact with the content of the direct touch area without the screen reader's assistance.
falsetrueIf necessary, use the _hint property to provide users with instructions on how to interact with the content of the node when direct interaction is enabled.
Platform support: This property is only supported on iOS.