You.i Engine
CYIAccessibilityEvent Class Reference

Detailed Description

Accessibility related events.

Accessibility events arise in circumstances where platform screen reading technologies are being used to interact with the application. The events can result in spoken announcements from the platform or changes to the accessibility focus context. As a result, some of these events resemble CYIFocusEvent in nature.

Accessibility events can spawn other accessibility events when not explicitly handled by a user-provided event handler. For example, an CYIEvent::Type::AccessibilityFocusNext event that is allowed to bubble up unhandled may result in an CYIEvent::Type::AccessibilityFocusIn and ultimately an CYIEvent::Type::AccessibilityAnnounce.

#include <accessibility/YiAccessibilityEvent.h>

Inheritance diagram for CYIAccessibilityEvent:

Public Types

enum  InteractionContext {
 The type of interaction which triggered the accessibiltiy event. More...
- Public Types inherited from CYIEvent
enum  Type : uint8_t {
  Type::None = 0,
 The event type of the CYIEvent class instance. More...
enum  Phase : uint8_t {
  Phase::None = 0,
 The current processing phase of the event. More...
enum  Priority {
  Priority::Highest = 2,
  Priority::High = 1,
  Priority::Normal = 0,
  Priority::Low = -1,
  Priority::Lowest = -2,
  Priority::Default = Normal
 Priority of the event in the event queue. More...

Public Member Functions

 CYIAccessibilityEvent (CYIEvent::Type eventType)
 CYIAccessibilityEvent (const CYIAccessibilityEvent &other)=default
virtual std::unique_ptr< CYIEventClone () const
- Public Member Functions inherited from CYIEvent
 CYIEvent (CYIEvent::Type eventType)
 CYIEvent (const CYIEvent &rOther)
virtual ~CYIEvent ()
const CYIStringGetName () const
CYIEvent::Type GetType () const
void SetType (CYIEvent::Type eventType)
bool IsActionEvent () const
std::unique_ptr< CYIActionEventCloneAsActionEvent () const
bool IsKeyEvent () const
std::unique_ptr< CYIKeyEventCloneAsKeyEvent () const
bool IsFocusEvent () const
std::unique_ptr< CYIFocusEventCloneAsFocusEvent () const
bool IsTrackpadEvent () const
std::unique_ptr< CYITrackpadEventCloneAsTrackpadEvent () const
bool IsAccessibilityEvent () const
std::unique_ptr< CYIAccessibilityEventCloneAsAccessibilityEvent () const
bool IsGestureEvent () const
std::unique_ptr< CYIGestureEventCloneAsGestureEvent () const
bool IsSwipeGestureEvent () const
bool IsScrubGestureEvent () const
std::unique_ptr< CYISwipeGestureEventCloneAsSwipeGestureEvent () const
void SetTarget (const CYIEventTarget *pTarget)
const std::shared_ptr< CYIEventTargetProxy > & GetTargetProxy () const

Public Attributes

InteractionContext m_interactionContext
CYIString m_text
std::shared_ptr< CYISceneNodeProxym_pAccessibilityTarget
std::shared_ptr< CYISceneNodeProxym_pRelatedAccessibilityTarget
- Public Attributes inherited from CYIEvent
uint64_t m_eventTimeMs
Phase m_phase
bool m_canCancel
bool m_canBubble
bool m_canCapture
bool m_stopPropagation
bool m_handled

Member Enumeration Documentation

◆ InteractionContext

The type of interaction which triggered the accessibiltiy event.


Triggered by touch event


Triggered by application directly


Triggered by focus navigation events


Triggered by screen reading


Used to perform the accessibility event silently. Silent CYIEvent::Type::AccessibilityAnnounce will trigger an assertion in debug builds.

Constructor & Destructor Documentation

◆ CYIAccessibilityEvent() [1/2]

CYIAccessibilityEvent::CYIAccessibilityEvent ( CYIEvent::Type  eventType)

◆ CYIAccessibilityEvent() [2/2]

CYIAccessibilityEvent::CYIAccessibilityEvent ( const CYIAccessibilityEvent other)

Member Function Documentation

◆ Clone()

virtual std::unique_ptr<CYIEvent> CYIAccessibilityEvent::Clone ( ) const

Reimplemented from CYIEvent.

Member Data Documentation

◆ m_interactionContext

InteractionContext CYIAccessibilityEvent::m_interactionContext

The interaction context that describes how the event occurred.

◆ m_pAccessibilityTarget

std::shared_ptr<CYISceneNodeProxy> CYIAccessibilityEvent::m_pAccessibilityTarget

Represents the main target of the accessibility event. For AccessibilityFocusIn this is the newly focused element, for AccessibilityFocusOut it is the element losing focus, for AccessibilityFocusNext and AccessibilityFocusPrevious it is the element from which the search will be performed.

◆ m_pRelatedAccessibilityTarget

std::shared_ptr<CYISceneNodeProxy> CYIAccessibilityEvent::m_pRelatedAccessibilityTarget

Represents the secondary target of the accessibility event. For AccessibilityFocusIn this is the previously focused element, for AccessibilityFocusOut it is the element which is gaining focus, for AccessibilityFocusNext and AccessibilityFocusPrevious it is unused.

◆ m_text

CYIString CYIAccessibilityEvent::m_text

The text to be spoken if this is an CYIEvent::Type::AccessibilityAnnounce. Otherwise unused. >

The documentation for this class was generated from the following file: