Libraries.Interface.Accessibility Documentation

Accessibility is a class designed to encapsulate accessibility concepts across all operating systems, inside of the graphics and user interface system. Accessibility systems are not the same everywhere, including on Windows (UIA), Mac (NSAccessibility), or the web, and as such each platform or operating environment must implement its own Accessibility sub-class.

Inherits from: Libraries.Language.Object

Actions Documentation

Add(Libraries.Interface.Item item)

This action indicates that an item should be explicitly added to the accessibility system.

Parameters

BoundsChanged(Libraries.Interface.Item item)

This action indicates that an item's position and/or size changed.

Parameters

ButtonActivated(Libraries.Interface.Controls.Button button)

This action indicates that a button has been activated, which can be done either through a click, use of the enter key, or really any other mechanism allowable in the implementation.

Parameters

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

ControlActivated(Libraries.Interface.Events.ControlActivationEvent event)

This action indicates that a control was activated and this notifies the accessibility system.

Parameters

DescriptionChanged(Libraries.Interface.Item item)

This action indicates that an item had its description changed.

Parameters

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

FocusChanged(Libraries.Interface.Events.FocusEvent event)

This action indicates that the focus changed. Generally, implementing this is a minimum bar for almost any kind of meaningful accessibility interaction.

Parameters

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

IsScreenReaderListening()

This action hypothetically tells us whether a screen reader is being used. In almost all implementations, whether this works is hit and miss. Some accessibility systems, at the operating system level, claim to report this but do not do so correctly. Other systems explicitly do not allow querying for this information (e.g., the web). In any case, if this implementation returns false, it means either there is no screen reader or the system does not allow querying.

Return

boolean: whether or not a screen reader is listening, although whether this is correct is operating environment dependent.

This action indicates a menu was changed and the accessibility system should be informed.

Parameters

NameChanged(Libraries.Interface.Item item)

This action indicates that an item had its name changed.

Parameters

NativeAdd(Libraries.Interface.Item item)

This action adds on a per platform basis any item that needs to raw to go the native system.

Parameters

Return

boolean:

NativeRemove(Libraries.Interface.Item item)

This action indicates that an item should be explicitly removed from the native accessibility system.

Parameters

Return

boolean:

Notify(Libraries.Interface.Item item, text value, integer notificationType)

This action indicates to make a statement from the accessibility system. Not all accessibility systems support such events and in our experience, even if they do, whether they work is inconsistent. We urge caution in relying in production on these actions.

Parameters

  • Libraries.Interface.Item: The item to be notified from
  • text value: The value to speak
  • integer notificationType: some systems have a notification type, although in our experience whether particular implementations actually correctly respond to them is hit and miss.

Notify(Libraries.Interface.Item item, text value)

This action indicates to make a statement from the accessibility system. Not all accessibility systems support such events and in our experience, even if they do, whether they work is inconsistent. We urge caution in relying in production on these actions.

Parameters

ProgressBarValueChanged(Libraries.Interface.Events.ProgressBarValueChangedEvent progress)

This action indicates that a progress bar has had its value changed.

Parameters

Remove(Libraries.Interface.Item item)

This action indicates that an item should be explicitly removed from the accessibility system.

Parameters

Select(Libraries.Interface.Item item)

Parameters

Return

boolean

SelectionChanged(Libraries.Interface.Events.SelectionEvent event)

This action indicates that the selection has changed for a particular item.

Parameters

Setup()

Accessibility may require custom setup for each platform. This action is called during StartGame, before a window is created.

Shutdown()

The Shutdown action shuts down the underlying accessibility architecture.

TextChanged(Libraries.Interface.Events.TextChangeEvent event)

This action indicates that a component that involves text had a change in its value. This is used in multiple components, including text fields and text boxes.

Parameters

TextFieldUpdatePassword(Libraries.Interface.Controls.TextField field)

This action indicates that a text field in password mode had its value changed.

Parameters

TextSelectionChanged(Libraries.Interface.Selections.TextFieldSelection selection)

TextSelectionChanged(Libraries.Interface.Selections.TextBoxSelection selection)

In some implementations, this triggers a focus change event.

Parameters

ToggleButtonToggled(Libraries.Interface.Controls.ToggleButton button)

This action indicates that a toggle button has had its status changed.

Parameters

TreeChanged(Libraries.Interface.Events.TreeChangeEvent event)

This action indicates that a tree was changed and this notifies the accessibility system.

Parameters

TreeTableChanged(Libraries.Interface.Events.TreeTableChangeEvent event)

This action indicates that a tree table was changed and this notifies the accessibility system.

Parameters

Update()

In some implementations, this triggers a focus change event.

WindowFocusChanged(Libraries.Interface.Events.WindowFocusEvent event)

This action indicates that there was a change in the window focus. Broadly, this occurs when there is a pop-up box, dialog, or something similar.

Parameters