A server interface for screen reader support.
Creates a new, empty accessibility element resource.
Note: An accessibility element is created and freed automatically for each Node. In general, this function should not be called manually.
Creates a new, empty accessibility sub-element resource. Sub-elements can be used to provide accessibility information for objects which are not Nodes, such as list items, table cells, or menu items. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the free_element() method.
Creates a new, empty accessibility sub-element from the shaped text buffer. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the free_element() method.
If is_last_line is true, no trailing newline is appended to the text content. Set to true for the last line in multi-line text fields and for single-line text fields.
Frees the accessibility element id created by create_element(), create_sub_element(), or create_sub_text_edit_elements().
Sets the window focused state for assistive apps.
Note: This method is implemented on Linux, macOS, and Windows.
Note: Advanced users only! Window objects call this method automatically.
Sets window outer (with decorations) and inner (without decorations) bounds for assistive apps.
Note: This method is implemented on Linux, macOS, and Windows.
Note: Advanced users only! Window objects call this method automatically.
Adds a callback for the accessibility action (action which can be performed by using a special screen reader command or buttons on the Braille display), and marks this action as supported. The action callback receives one Variant argument, which value depends on action type.
Adds a child accessibility element.
Note: Node children and sub-elements are added to the child list automatically.
Adds support for a custom accessibility action. action_id is passed as an argument to the callback of ACTION_CUSTOM action.
Sets text underline/overline/strikethrough.
Sets text selection to the text field. text_start_id and text_end_id should be elements created by create_sub_text_edit_elements(). Character offsets are relative to the corresponding element.
ROLE_UNKNOWN = 0Unknown or custom role.
ROLE_DEFAULT_BUTTON = 1Default dialog button element.
ROLE_AUDIO = 2Audio player element.
ROLE_VIDEO = 3Video player element.
ROLE_STATIC_TEXT = 4Non-editable text label.
ROLE_CONTAINER = 5Container element. Elements with this role are used for internal structure and ignored by screen readers.
ROLE_PANEL = 6Panel container element.
ROLE_BUTTON = 7Button element.
ROLE_LINK = 8Link element.
ROLE_CHECK_BOX = 9Check box element.
ROLE_RADIO_BUTTON = 10Radio button element.
ROLE_CHECK_BUTTON = 11Check button element.
ROLE_SCROLL_BAR = 12Scroll bar element.
ROLE_SCROLL_VIEW = 13Scroll container element.
ROLE_SPLITTER = 14Container splitter handle element.
ROLE_SLIDER = 15Slider element.
ROLE_SPIN_BUTTON = 16Spin box element.
ROLE_PROGRESS_INDICATOR = 17Progress indicator element.
ROLE_TEXT_FIELD = 18Editable text field element.
ROLE_MULTILINE_TEXT_FIELD = 19Multiline editable text field element.
ROLE_COLOR_PICKER = 20Color picker element.
ROLE_TABLE = 21Table element.
ROLE_CELL = 22Table/tree cell element.
ROLE_ROW = 23Table/tree row element.
ROLE_ROW_GROUP = 24Table/tree row group element.
ROLE_ROW_HEADER = 25Table/tree row header element.
ROLE_COLUMN_HEADER = 26Table/tree column header element.
ROLE_TREE = 27Tree view element.
ROLE_TREE_ITEM = 28Tree view item element.
ROLE_LIST = 29List element.
ROLE_LIST_ITEM = 30List item element.
ROLE_LIST_BOX = 31List view element.
ROLE_LIST_BOX_OPTION = 32List view item element.
ROLE_TAB_BAR = 33Tab bar element.
ROLE_TAB = 34Tab bar item element.
ROLE_TAB_PANEL = 35Tab panel element.
ROLE_MENU_BAR = 36Menu bar element.
ROLE_MENU = 37Popup menu element.
ROLE_MENU_ITEM = 38Popup menu item element.
ROLE_MENU_ITEM_CHECK_BOX = 39Popup menu check button item element.
ROLE_MENU_ITEM_RADIO = 40Popup menu radio button item element.
ROLE_IMAGE = 41Image element.
ROLE_WINDOW = 42Window element.
ROLE_TITLE_BAR = 43Embedded window title bar element.
ROLE_DIALOG = 44Dialog window element.
ROLE_TOOLTIP = 45Tooltip element.
ROLE_REGION = 46Region/landmark element. Screen readers can navigate between regions using landmark navigation.
ROLE_TEXT_RUN = 47Unifor text run.
Note: This role is used for internal text elements, and should not be assigned to nodes.
POPUP_MENU = 0Popup menu.
POPUP_LIST = 1Popup list.
POPUP_TREE = 2Popup tree view.
POPUP_DIALOG = 3Popup dialog.
FLAG_HIDDEN = 0Element is hidden for accessibility tools.
FLAG_MULTISELECTABLE = 1Element supports multiple item selection.
FLAG_REQUIRED = 2Element require user input.
FLAG_VISITED = 3Element is a visited link.
FLAG_BUSY = 4Element content is not ready (e.g. loading).
FLAG_MODAL = 5Element is modal window.
FLAG_TOUCH_PASSTHROUGH = 6Element allows touches to be passed through when a screen reader is in touch exploration mode.
FLAG_READONLY = 7Element is text field with selectable but read-only text.
FLAG_DISABLED = 8Element is disabled.
FLAG_CLIPS_CHILDREN = 9Element clips children.
ACTION_CLICK = 0Single click action, callback argument is not set.
ACTION_FOCUS = 1Focus action, callback argument is not set.
ACTION_BLUR = 2Blur action, callback argument is not set.
ACTION_COLLAPSE = 3Collapse action, callback argument is not set.
ACTION_EXPAND = 4Expand action, callback argument is not set.
ACTION_DECREMENT = 5Decrement action, callback argument is not set.
ACTION_INCREMENT = 6Increment action, callback argument is not set.
ACTION_HIDE_TOOLTIP = 7Hide tooltip action, callback argument is not set.
ACTION_SHOW_TOOLTIP = 8Show tooltip action, callback argument is not set.
ACTION_SET_TEXT_SELECTION = 9Set text selection action, callback argument is set to Dictionary with the following keys:
- "start_element" accessibility element of the selection start.
- "start_char" character offset relative to the accessibility element of the selection start.
- "end_element" accessibility element of the selection end.
- "end_char" character offset relative to the accessibility element of the selection end.
ACTION_REPLACE_SELECTED_TEXT = 10Replace text action, callback argument is set to String with the replacement text.
ACTION_SCROLL_BACKWARD = 11Scroll backward action, callback argument is not set.
ACTION_SCROLL_DOWN = 12Scroll down action, callback argument is set to AccessibilityScrollUnit.
ACTION_SCROLL_FORWARD = 13Scroll forward action, callback argument is not set.
ACTION_SCROLL_LEFT = 14Scroll left action, callback argument is set to AccessibilityScrollUnit.
ACTION_SCROLL_RIGHT = 15Scroll right action, callback argument is set to AccessibilityScrollUnit.
ACTION_SCROLL_UP = 16Scroll up action, callback argument is set to AccessibilityScrollUnit.
ACTION_SCROLL_INTO_VIEW = 17Scroll into view action, callback argument is set to AccessibilityScrollHint.
ACTION_SCROLL_TO_POINT = 18Scroll to point action, callback argument is set to Vector2 with the relative point coordinates.
ACTION_SET_SCROLL_OFFSET = 19Set scroll offset action, callback argument is set to Vector2 with the scroll offset.
ACTION_SET_VALUE = 20Set value action, callback argument is set to String or number with the new value.
ACTION_SHOW_CONTEXT_MENU = 21Show context menu action, callback argument is not set.
ACTION_CUSTOM = 22Custom action, callback argument is set to the integer action ID.
LIVE_OFF = 0Indicates that updates to the live region should not be presented.
LIVE_POLITE = 1Indicates that updates to the live region should be presented at the next opportunity (for example at the end of speaking the current sentence).
LIVE_ASSERTIVE = 2Indicates that updates to the live region have the highest priority and should be presented immediately.
SCROLL_UNIT_ITEM = 0The amount by which to scroll. A single item of a list, line of text.
SCROLL_UNIT_PAGE = 1The amount by which to scroll. A single page.
SCROLL_HINT_TOP_LEFT = 0A preferred position for the node scrolled into view. Top-left edge of the scroll container.
SCROLL_HINT_BOTTOM_RIGHT = 1A preferred position for the node scrolled into view. Bottom-right edge of the scroll container.
SCROLL_HINT_TOP_EDGE = 2A preferred position for the node scrolled into view. Top edge of the scroll container.
SCROLL_HINT_BOTTOM_EDGE = 3A preferred position for the node scrolled into view. Bottom edge of the scroll container.
SCROLL_HINT_LEFT_EDGE = 4A preferred position for the node scrolled into view. Left edge of the scroll container.
SCROLL_HINT_RIGHT_EDGE = 5A preferred position for the node scrolled into view. Right edge of the scroll container.