Screen Reader for uGUI 1.0.0 · manual

Screen Reader for uGUI manual

Version 1.0.0. A short overview is in the README.md file and the release history is in the CHANGELOG.md file, both in the root folder of the package.

Overview

Unity's Accessibility module (UnityEngine.Accessibility) is a scripting API. It lets you describe an AccessibilityHierarchy of nodes and hands it to the screen reader of the operating system, but it does not build that hierarchy from your scene or from your UI. Screen Reader for uGUI does that part for uGUI.

You add an AccessibleCanvas to a Canvas. While a screen reader is running, the package:

  1. Scans the uGUI controls under the Canvas and decides which are nodes.
  2. Builds Unity's AccessibilityHierarchy from them, with a role, label, value, hint, states, actions and a frame on the screen for each node.
  3. Keeps it in sync while the UI changes (a text, a slider value, a control becoming disabled, a panel opening).
  4. Maps the actions the reader sends (activate, increment, decrement, scroll, dismiss) back to your controls, and keeps the EventSystem selection in step with the reader's focus.

What it does not do: speak. The package feeds the screen reader that the operating system runs (TalkBack, VoiceOver, Narrator). With no reader running, nothing is heard. For checks without a reader there are snapshots, a simulator, a debug overlay and the Editor tools.

It is plain C# on Unity's built-in Accessibility module: no native code, no shaders, no materials, no third-party code. It reads no input devices, never creates an EventSystem and sends nothing over a network.

Requirements

  • Unity 6000.0.84f1 or newer; that is the minimum the package declares. Other Unity 6 versions use the 6000.0 feature set below 6000.3 and the 6000.3 feature set from it; only 6000.0.84f1 and 6000.3.12f1 were compiled and run (see Platform support and tested on).
  • The built-in modules Accessibility, UI and IMGUI. The package declares them, so Unity enables them with the package. IMGUI is used only by the debug overlay.
  • The Unity UI package, com.unity.ugui, which every new project has. TextMeshPro is part of it in Unity 6. Without com.unity.ugui only the enums and the platform layer compile; the components do not exist.
  • An EventSystem in the scene for the actions that select or click controls, like a Button needs one. The package never creates it.
  • Android needs API level 26 or newer, which is Unity's requirement for the module.
  • The TextMeshPro scene of the Demo sample needs the TMP Essential Resources (Window > TextMeshPro > Import TMP Essential Resources). The package itself does not.

Installation

From the Asset Store

  1. Open the Package Manager: Window > Package Manager in Unity 6.0, Window > Package Management > Package Manager in Unity 6.3.
  2. Select My Assets and find Screen Reader for uGUI.
  3. Click Install.

The package appears under Packages > Screen Reader for uGUI and its files are read-only.

Demo sample

In the Package Manager, select the package, open the Samples tab and import Demo. Unity copies it into Assets/Samples.

Scene What it shows
00 Menu A button per scene, a toggle that sets Activation to AlwaysOn, a toggle that draws the accessibility frames, and a status text.
01 Settings Toggles, two sliders (one labelled by the text before it, one by LabelSource), a dropdown that opens a modal list, a disabled button and an announcement.
02 Long List A scroll view with 100 rows and a scrollbar.
03 Sign In Input fields, a password field, a toggle and a modal dialog that answers Dismiss.
04 Text and TextMeshPro Unity Text and TextMeshPro paragraphs with rich text, a TMP button, input field and dropdown.

The five scenes must be in the Scene List (File > Build Profiles) with 00 Menu first, because the menu loads them by name. The sample creates its EventSystem at run time. The scenes use uGUI and Unity's built-in font; the TextMeshPro scene needs the TMP Essential Resources. A README.txt inside the sample says more. 00 Menu has a small luanrobs.com/screen-reader-ugui link that opens the product page only when you click it.

Quick start

  1. Select the root Canvas of a menu.
  2. Add Component > luanrobs > Accessible Canvas. To cover every Canvas of the open scenes at once, use Tools > luanrobs > Screen Reader for uGUI > Make Canvases Accessible.
  3. Press Play with a screen reader running on a supported platform (see Activation modes to look at the result without one).

Every control under that Canvas is now mapped by its type: a Button reads the texts inside it and offers Activate, a Slider offers Increment and Decrement, and so on. Open Tools > luanrobs > Screen Reader for uGUI > Validator to find controls that would have no label.

To react to what happens, or to announce something, use UguiScreenReader:

using Luanrobs.A11y;
using UnityEngine;

public class SettingsScreen : MonoBehaviour
{
    private void OnEnable()
    {
        UguiScreenReader.ScreenReaderStatusChanged += OnStatus;
    }

    private void OnDisable()
    {
        UguiScreenReader.ScreenReaderStatusChanged -= OnStatus;
    }

    private void OnStatus(bool readerOn)
    {
        // Show or hide help that only matters with a screen reader.
    }

    public void Apply()
    {
        UguiScreenReader.Announce("Settings saved");
    }
}

How the mapping works

An AccessibleCanvas scans its RectTransform subtree depth-first, in sibling order. A GameObject is skipped, with its whole subtree, when it is inactive, when it has a Canvas component that is not enabled (Unity's cheap way to hide a menu draws nothing below it), when it has an AccessibleElement with Exposure Hidden, when it is the root of another AccessibleCanvas (that scope scans it), when it is the Blocker of an open dropdown, or, with Hide Transparent, when its CanvasGroup alpha (with its parents') is 0.001 or less. A scope whose own Canvas, or a Canvas above it, is not enabled exposes nothing. A CanvasGroup with Blocks Raycasts off is not hidden: a keyboard or gamepad still reaches its controls. A Graphic that is not enabled is not read. A control that became hidden since the last update refuses every reader action at once.

What each GameObject becomes depends on its own components, first match wins: Dropdown, TMP_Dropdown, InputField, TMP_InputField, Toggle, Slider, Scrollbar, Button, any other enabled Selectable, ScrollRect, Text, TMP_Text, an Image or RawImage that has an AccessibleElement with a label, and any other GameObject that has an AccessibleElement giving a label, actions or a non-Default exposure. Anything else is not a node, and its children are scanned as usual. A scrollbar that belongs to a ScrollRect (Unity's default Scroll View) is not a node; the scroll view is.

Control Role Label Value States Actions
Button Button The readable texts inside it, joined with ", " none Disabled Activate
Toggle Toggle As Button toggleOnValue when on, toggleOffValue when off (both empty by default) Selected when on; Disabled Activate
Slider Slider Label source, then the nearby label Whole numbers: the number. Otherwise a percent (percentFormat) Disabled Increment, Decrement
Scrollbar Slider Label source, then the nearby label A percent Disabled Increment, Decrement
Dropdown, TMP_Dropdown Dropdown Label source, then the nearby label The caption, else the selected option Expanded while open; Disabled Activate (opens the list); Dismiss while open
InputField, TMP_InputField TextField Label source, nearby label, then the placeholder's text The text. Password: the length (passwordFormat), never the text Disabled Activate (selects and activates the field)
Text, TMP_Text StaticText The readable text none none none
Image Image From an AccessibleElement only none none none
ScrollRect ScrollView From an AccessibleElement only none none Scroll, when the content is larger than the viewport and the ScrollRect component is enabled
Other Selectable Button when it handles submit or click, else none As Button none Disabled Activate

On Unity before 6000.3 the roles TextField, Dropdown and ScrollView do not exist: a text field is given no role and the hint "Text field", a dropdown is a Button with the hint "Dropdown", and a scroll view has no role. There is no Expanded state either.

Texts inside controls are consumed. The texts inside a Button, Toggle, Dropdown, input field, slider or scrollbar are part of that control's label and are not exposed as separate nodes. A control nested inside a Button is still its own node. With Exposure Group an element becomes one node and nothing below it is scanned; every text below it is read into the label.

Readable text. Unity Text with rich text on has its tags removed (b, i, size, color, material, quad); anything else is kept literally, so 5 < 6 stays. TextMeshPro text is read through TextMeshPro's own parser, so what it renders is what is read. Whitespace is collapsed. A text that reads as empty is not a node.

Nearby labels. With Infer Nearby Labels on, a slider, scrollbar, dropdown or input field without a label of its own takes a text read before it as its label: the text immediately before it, when that text is in the same row and before it, or a caption above it (its bottom edge above the control's top by at most the control's height) that overlaps the control horizontally. To find the caption of its own column, the package looks back past other controls of the same row and past captions above that belong to another column, so in a form "First name | Last name" with the captions above the fields each field takes the caption of its own column. The text must have no AccessibleElement that changes it. That text is then not exposed itself. The Inspector's Resolved view shows the same result.

Disabled. A control is Disabled when it is not interactable (this includes a CanvasGroup with Interactable off). It keeps its actions in the description, so the reader announces it as disabled, and the package refuses every action on it.

Values and strings. The texts the package adds are in AccessibilityStrings (UguiScreenReader.Strings): percentFormat ("{0}%"), passwordFormat ("{0} characters"), pageFormat ("Page {0} of {1}"), textFieldHint, dropdownHint, toggleOnValue, toggleOffValue and emptyFieldValue. Assign a new instance to localise them. Numbers use the current culture, because they are read aloud.

Changes. The package notices, within one update, a text, interactable, active, Canvas enabled, CanvasGroup alpha, toggle, slider, dropdown or input field change, a control added or removed, or a layout change. A value, hint or NotifyChanged() re-describes only that element; it does not rescan the scope. Two things it cannot see: the result of a provider delegate, and a component added or removed with no change to the hierarchy. Call AccessibleElement.NotifyChanged() or AccessibleCanvas.MarkDirty() for those.

Overriding with AccessibleElement

Add Add Component > luanrobs > Accessible Element (or Tools > luanrobs > Screen Reader for uGUI > Add Accessible Element to Selection) to change what a control gives the reader. Each text is resolved in this order: provider delegate, then the field, then the inferred value.

Field Effect
Exposure Default: one node. Hidden: not exposed, with its children. Group: one node for the whole subtree, whose label is the element's label or the texts below it. Container: the elements below it are nested under its node.
Role Auto infers the role. Another value replaces the role; the behaviour and the actions stay those of the control.
Label, Label Source The label, or a Text or TextMeshPro component whose text is the label (for example a caption beside a slider).
Hint Replaces the package's own hint.
Value Replaces the inferred value.
Order Reading order among siblings; lower is read first.
Step The step of Increment and Decrement for sliders and scrollbars. 0: one whole number, or 5% of the range; for a scrollbar with steps, one step.
Actions Actions the element answers beyond its control's. For custom components.
On Activate, On Increment, On Decrement, On Dismiss Called for those actions. For an action the control accepted, the event is called after the control's action; for an action only the element declares, the event is the action.
On Focus Changed Called with true when the reader's focus enters the element and false when it leaves.

Code can set LabelProvider, ValueProvider and HintProvider (delegates that return a string; an empty result falls back to the field). They are not part of the change detection: call NotifyChanged() when their result changes. Exceptions thrown by your callbacks are logged and do not stop the package.

A custom control built from a plain GameObject becomes a node when it has an AccessibleElement with a label, actions or an exposure other than Default:

var element = go.AddComponent<AccessibleElement>();
element.Label = "Inventory slot 3";
element.Actions = AccessibleActions.Activate;
element.OnActivate.AddListener(() => UseSlot(3));

Reading order and focus

Order. Within a group of siblings the order is: AccessibleElement.Order ascending, then the scope's Reading Order. Layout (the default) sorts by screen position: rows from top to bottom, inside a row from left to right (right to left with Right To Left). Two elements share a row when their vertical centres differ by less than Row Tolerance (default 0.5) times the shorter height. Hierarchy keeps the order of the transforms. When two elements have the same top edge, the one first in reading direction starts the row, so the order depends only on the positions. The order is re-checked after layout, so a layout group that places its children late or a rotation reorders the nodes on the next update; an unchanged screen is not scanned again.

Scopes are ordered by Order ascending, then by the sorting order of their Canvas (higher first), then by registration. The package's nodes come first in Unity's hierarchy; nodes you add yourself stay after them.

Frames. Each node's frame is the control's bounding box in screen pixels with the origin at the top left, for Overlay, Camera and World Space canvases (a World Space canvas needs a camera; its frame is empty when it has none or the corners are behind the camera). Frames of items in a scroll view are clipped to the viewport.

Focus. When the reader moves to a control, the package scrolls it into view in every ScrollRect above it (for an option of an open dropdown, only the list itself, so a list around the dropdown does not move under the finger) and, with Sync Selection on (the default), selects it in the EventSystem. Your Selectable's selected visuals therefore follow the reader. Input fields are the exception: they are not selected by reader focus, because Unity then opens the on-screen keyboard; their Activate action selects and activates them. The other direction is Follow Selection (off by default): when a keyboard or gamepad changes the EventSystem selection, the reader is told to move its focus there.

You can follow the reader's focus with UguiScreenReader.FocusChanged or AccessibleElement.OnFocusChanged.

Give the dialog's panel its own AccessibleCanvas and switch Modal on. While it is enabled and shown, every node outside it is hidden from the reader, so the reader cannot reach the form behind the dialog. A Modal scope that is hidden (its Canvas, or one above it, not enabled, or with Hide Transparent a fully transparent CanvasGroup) hides nothing. When the dialog appears, the reader is moved to its first node; when it goes away, to the control that had focus before it. A dropdown inside the dialog works as anywhere else: its open list is the only part the reader sees, and when it closes the reader goes back to the dropdown. An open list counts only inside the topmost Modal scope, so a newer Modal dialog (a "connection lost" popup) is read even when a list behind it is still open.

Unity delivers a dismiss gesture to the one node the reader is on. To let it work from any node of the dialog, add an AccessibleElement to the dialog's root, declare Dismiss in Actions and close the dialog in On Dismiss. Every node of that scope then answers Dismiss by calling that event. If the root element has no label it is not a node itself; it only provides the Dismiss routing. While a CanvasGroup on the dialog has Interactable off (a dialog locked during a save), Dismiss is refused. The package never closes your dialog on its own.

Which readers send a dismiss gesture is the reader's choice. VoiceOver has an escape gesture. Whether TalkBack's Back reaches Dismiss was not verified. Keep a visible close or OK button, as the Demo's sign-in dialog does.

Scroll lists and dropdowns

Scroll views. A ScrollRect is a node with the Scroll action when its content is larger than the viewport and the ScrollRect component is enabled (a list you lock by disabling its ScrollRect does not scroll from the reader). The elements under its content are its children. The Scroll action moves one viewport page along the axis (vertical when the list scrolls vertically, otherwise horizontal) and announces "Page 2 of 5" (pageFormat). From Unity 6000.3 a reader can send that gesture; before, only the simulator and code can.

Rows scrolled out of view stay in the hierarchy. Each gets a one-pixel frame on the edge of the viewport it lies beyond, so the reader can still move to it, and focusing it scrolls it into view. The Demo's 02 Long List shows this with 100 rows.

Lists that recycle or virtualise their rows expose only the rows that exist as GameObjects.

Dropdowns. Activating a Dropdown or TMP_Dropdown opens Unity's list. While it is open, the list is a modal scope: everything else leaves the reader's view, uGUI's full-screen Blocker is not exposed, the options are toggles labelled by their text with the current one Selected, and the dropdown node is Expanded (6000.3). Choosing an option, or Dismiss, closes it.

Activation modes

UguiScreenReader.Activation decides when the hierarchy exists. Default: Automatic.

Mode Hierarchy is built Published to the platform
Automatic While a screen reader is on While a screen reader is on
AlwaysOn Always, while at least one AccessibleCanvas is enabled In the Editor at once; in a player only while the OS screen reader is on (see below)
Off Never Never

With nothing built, the package does almost nothing per frame: one property read for the reader status and a compare of the platform object.

Why AlwaysOn publishes only while a reader is on. Unity's module, in a player, accepts the hierarchy you assign to AssistiveSupport.activeHierarchy only while the OS screen reader is enabled; otherwise the value is dropped and activeHierarchy stays null. This was found on an Android emulator with TalkBack off (IsBuilding true, IsPublished false) and traced in the code of the Android players of Unity 6000.0.84f1 and 6000.3.12f1. It is Unity's behaviour, not a package setting. The Editor accepts the hierarchy with the reader off, so the Hierarchy Viewer shows it.

So with AlwaysOn and no reader in a player: IsBuilding is true (snapshots, the simulator and the debug overlay work) and IsPublished is false. The package publishes at the start; when Unity refuses, it tries again after the reader status it polls has changed, after Unity's own reader status event, and once a second while the reader is on, never at every update. The first update that sees the reader on publishes. After publishing again it tells the reader the screen changed, so a reader that caches the tree reads it again. Use AlwaysOn to inspect and test; in your shipped game leave Automatic.

On Windows with Unity 6000.3 the same holds with Narrator off. For an automated check, Unity 6000.3 has AssistiveSupport.screenReaderStatusOverride; setting it does not raise Unity's status event, so the package also polls the status on each update.

Announcements

A text that appears or changes on screen is not read by itself; the package has no live regions. Call:

  • UguiScreenReader.Announce(string message): the reader speaks the message.
  • UguiScreenReader.NotifyScreenChanged(GameObject focus = null): a new screen appeared; the reader starts again, optionally at a control.
  • UguiScreenReader.NotifyLayoutChanged(GameObject focus = null): part of the screen changed.

The package sends a screen-changed notice itself when a scope appears (when Announce On Enable is on, and always for a modal scope) and a layout-changed notice when the structure changes. Announce works while the hierarchy is being built, and AnnouncementSent receives every message the package sends, so tests can check them. Whether a reader speaks an announcement is up to the platform.

Platform support and tested on

What Unity's module supports

Platform Unity 6000.0 Unity 6000.3
Android, TalkBack (API level 26 or newer) yes yes
iOS, VoiceOver yes yes
Windows player, Narrator no: nothing is published yes
macOS player, VoiceOver no: nothing is published yes
WebGL, Linux, consoles no no

This is Unity's documented support. Unity's module also says that, because of differences among the platform-native APIs, certain Accessibility module APIs have platform-specific limitations. On a platform Unity does not support, the package builds the hierarchy but publishes nothing; UguiScreenReader.IsPlatformSupported tells you.

Tested on

This lists what was run for version 1.0.0 on 2026-10-21 (last runs after the final code changes of that day). A platform that is not listed, or a row that says not run, was not run. The Windows 11 machine is the development machine; Windows tests ran at 96 DPI.

What Result
Unity 6000.3.12f1, Windows Editor 284 of 284 EditMode tests and 67 of 67 PlayMode tests passed, in the development project and again in a clean project.
Unity 6000.0.84f1, Windows Editor 281 of 281 EditMode tests passed. PlayMode: 65 passed, 1 skipped, 0 failed, in a clean project. The skipped test drives Unity's own dispatch path and needs the status override that exists only in 6000.3.
Windows player, Mono, 6000.3.12f1 A smoke driver walked the five demo scenes through the simulator and compared the hierarchy with the recorded one: pass. A UI Automation check passed: one element per active node with the node's label as its name, the control types Button, CheckBox, Slider, ComboBox, Text, nodes hidden by a modal absent, a row added at run time listed, positions within 2 px. The reader was forced on with Unity's status override. Narrator was not started and nothing was heard.
Windows player, IL2CPP (managed stripping High), 6000.3.12f1 The same smoke and the same UI Automation check passed.
Windows player, Mono, 6000.0.84f1 The smoke passed. Unity does not publish on Windows in 6000.0, so UI Automation saw no nodes; the hierarchy was built and checked through snapshots.
Android emulator, x86_64, Android 36 (Google Play image), IL2CPP The smoke passed with TalkBack on (built and published) on 6000.3.12f1 and on 6000.0.84f1. With TalkBack off (built, not published, as described above) it passed on 6000.3.12f1 in an earlier run of the same day, before the last code changes.
Clean project from the .tgz archive, 6000.3.12f1 and 6000.0.84f1 On both: the package installed from the archive with the Demo sample imported through its manifest entry, the EditMode and PlayMode tests above, a Windows Mono player of the five sample scenes with the smoke passing and no missing script in the player log (6000.3 also with the UI Automation check), and three Play sessions in a row with Domain Reload disabled: the package's static fields were the same at the start of every session, one hidden helper object while playing and none afterwards, the hierarchy published in every session and cleared at the end of each, the same nodes in every session. The 6000.0 project also passed the Android emulator smoke with TalkBack on.
iOS, macOS Not run. Unity's API supports them, but they were not tested.
WebGL, Linux, consoles Not run; not supported by Unity's module.
Physical Android or iOS device, other screen readers Not run.
URP, HDRP, the Input System package Not run. The package draws nothing but the optional debug overlay (IMGUI) and reads no input.

What the Android run does not show:

  • TalkBack speech and gestures were not tested. Nobody listened to TalkBack, and no touch gesture or swipe reached it.
  • That the nodes reach Android's accessibility tree was not observed. uiautomator dump lists only the activity's own views and none of Unity's nodes, and dumpsys accessibility showed no accessibility focus. What was checked is Unity's side: the package reported the hierarchy as published and the reader as on, only while TalkBack was on.
  • The frame conversion on Android (status bar, display cutout, resolution scaling) was not verified.

A smoke test that walks the scenes through the simulator proves that the package builds and operates the hierarchy. It does not prove how a particular reader reads it.

The Editor tools

All menu items are under Tools > luanrobs > Screen Reader for uGUI.

Accessible Canvas Inspector. Shows the fields with their tooltips and a Screen reader preview foldout that lists what the scope exposes, one row per node, indented by depth, with role, label, value, states and actions. In Edit mode it is computed from the scene; in Play mode, while the hierarchy is built, it shows the real nodes, refreshed every half second. Click a row to select the GameObject. It also lists the validator's issues for the scope, has buttons that open the Validator and Unity's Hierarchy Viewer, and in Play mode a status line (reader on, building, published, platform supported).

Accessible Element Inspector. The fields, the events in a foldout, a Resolved view of the role, label, value, hint, states and actions the package gives this element now (including a nearby label), and this element's issues.

Validator (menu item). A window with Scan open scenes (and the open prefab stage). It never runs on its own. Issues are listed by scene with a severity, a Select button and, where the fix is clear, an undoable fix button.

Rule Severity Reports
MissingLabel Error An element with Activate, Increment or Decrement, or the role Image, whose label would be empty.
LabelSourceNotText Error A Label Source that is not a Text or TextMeshPro component.
NotUnderCanvas Error An AccessibleElement on a GameObject without a RectTransform or outside any Canvas.
DuplicateLabel Warning Two interactive elements of one scope with the same label and role.
ZeroSize Warning An element whose rect has zero width or height.
NoAccessibleCanvas Warning A root Canvas with an active Selectable that no enabled AccessibleCanvas covers (a disabled one does not count). Reported on the root Canvas, so one scope covers the screen. Fix: Add Accessible Canvas (or enable the disabled one).
ActionWithoutHandler Warning Actions on an AccessibleElement that its control cannot perform and whose event has no persistent listener.
AdjustWithoutSlider Warning Increment or Decrement on an element whose role is not Slider: readers send them only to Slider nodes, so only code reaches it.

Make Canvases Accessible. Adds an AccessibleCanvas to the selected Canvases, or to every root Canvas of the open scenes when nothing is selected. Canvases that already have an enabled one on them or above them are skipped; a disabled one on the Canvas is enabled. Undoable.

Add Accessible Element to Selection. Adds an AccessibleElement to each selected scene GameObject that has none. Undoable.

Open Unity Accessibility Hierarchy Viewer. Opens Unity's own Window > Accessibility > Hierarchy Viewer. It shows the hierarchy while the game is running in the Editor; use Activation = AlwaysOn if no screen reader is on. If your Unity version does not have the window, the menu says so.

Documentation. Opens the online manual in your browser, only when you click it.

Snapshots and the simulator

Snapshot. UguiScreenReader.CaptureSnapshot() (the whole hierarchy) or AccessibleCanvas.CaptureSnapshot() (one scope) copies the nodes depth-first. ToText() gives a line per node (the numbers here are only an illustration):

# screen 1280x720
Header "Settings" frame=40,24,200,40
Toggle "Music" states=Selected actions=Activate frame=40,100,320,40
Slider "Volume" value="50%" actions=Increment|Decrement frame=40,150,320,40

ToText(includeFrames, includeInactive) can drop the frames and the nodes hidden by a modal scope. ToJson() gives the same data as JSON, with each node's GameObject path. Text and JSON are culture-invariant. AccessibilitySnapshot.Compare(expected, actual, frameTolerance) returns a list of differences, one message per line (line 3: expected '...' but was '...'), with frame numbers allowed to differ by the tolerance (default 1 pixel). Lines starting with # and empty lines are ignored. Store the text of a screen you have checked and compare it in a test; roles, hints and the Expanded state differ between Unity 6000.0 and 6000.3, so keep one expected file per version if you test on both.

Simulator. ScreenReaderSimulator does what a reader does, in code, while the hierarchy is built (AlwaysOn in tests):

AccessibilityNode node = ScreenReaderSimulator.Find("Volume");
ScreenReaderSimulator.Focus(node);
ScreenReaderSimulator.Increment(node);       // the Slider value goes up one step
ScreenReaderSimulator.Activate(ScreenReaderSimulator.Find("Apply"));

Find by label or by GameObject, Focus, FocusNext, FocusPrevious, Activate, Increment, Decrement, Scroll and Dismiss return false for a node that is not in the current hierarchy or that refuses the action (a disabled control, an action the node does not have). FocusNext and FocusPrevious visit active nodes that have a frame and a label, value or action, in hierarchy order. Increment works on any role here although readers send it only to sliders.

Debug overlay. Add luanrobs > Screen Reader Debug Overlay to a GameObject to draw the frame and label of every node over the game, with the focused node in another colour, while the hierarchy is built. It is for development; remove it for release.

Performance

Measured in the PlayMode tests on the development machine, in the Unity Editor. Not measured on a device.

  • While building, an update with no change reads one structure hash per due scope and one state hash and one frame per node, and writes nothing to the hierarchy. The tests assert no managed allocation for that update on an idle settings screen and on an idle 100-row list (rows of Unity Text, and rows of TextMeshPro text), also with the real platform layer, and over 60 frames of scrolling each list.
  • The time of that idle update for the 100-row list, measured on 2026-10-21 while other Unity processes ran on the same machine:
    • In the Editor (PlayMode test, median of 300 frames): 1.96 to 2.66 ms on Unity 6000.3.12f1 over three runs, 2.05 ms on 6000.0.84f1.
    • In players of the Demo's Long List (the smoke driver times Canvas.ForceUpdateCanvases() once per frame while the hierarchy is built and again with Activation = Off, and takes the difference of the medians): 0.63 to 1.12 ms in four Windows players (Mono and IL2CPP on 6000.3.12f1, Mono on 6000.0.84f1; 300 frames each), 1.50 ms (6000.3.12f1) and 1.24 ms (6000.0.84f1) on the x86_64 Android emulator with TalkBack on (120 frames each). Not measured on a phone.
  • An update that finds a change allocates (new nodes, formatted values, texts read again).
  • With the hierarchy not built, per frame the package reads one property and compares one reference.

Set Update Interval on an AccessibleCanvas (seconds of unscaled time between updates; 0 is every frame) to lower the cost of a large scope. The cost grows with the number of nodes.

Domain Reload

Static state is reset at the start of every Play session, so Play mode with Domain Reload disabled works. This includes the published hierarchy: Unity keeps activeHierarchy across the end of Play mode when Domain Reload is disabled, and the package clears its own at the start of the next session. The helper object that updates the package is hidden and not saved. Checked on 2026-10-21 in clean projects on Unity 6000.3.12f1 and 6000.0.84f1: three Play sessions in a row with Domain Reload disabled gave the same static state at the start of each session, the same nodes, the hierarchy published, one helper object while playing and none in Edit mode.

Limits

  • The package does not speak. With no screen reader running nothing is heard.
  • Text changes are not announced; use Announce.
  • The reader sees only scopes with an AccessibleCanvas.
  • Provider delegates and components added or removed without a hierarchy change need NotifyChanged() or MarkDirty().
  • Recycled or virtualised lists expose only the rows that exist as GameObjects.
  • Before Unity 6000.3: no scroll gesture from the reader, no Expanded state, no roles TextField, Dropdown, ScrollView or Container (hints and Button are used), and nothing is published on Windows and macOS.
  • Readers send increment and decrement only to Slider-role nodes.
  • Which readers send a dismiss gesture is the reader's choice; keep a visible close button.
  • Frames are screen pixels with a top-left origin, in the size of Screen.width and Screen.height. Frames when the render resolution is not the window's client size (exclusive full screen at a lower resolution, high DPI, Android resolution scaling) were not verified.
  • One shared hierarchy: Unity has one activeHierarchy. The package's nodes come first; if other code sets another hierarchy, the package leaves it and reports IsPublished false.
  • Unity's module has platform-specific limits of its own.
  • Not included: UI Toolkit, NGUI and other UI frameworks, self-voicing text-to-speech, colour-blind filters, subtitles, UI scaling, 3D world objects (the HierarchyChanged event lets you add nodes), live regions, custom rotor actions, right-to-left text shaping.
  • Use it on the main thread.

API reference

Namespace Luanrobs.A11y, assembly Luanrobs.A11y. Public members have XML documentation. Null arguments count as "none"; no public member throws for normal use.

UguiScreenReader (static)

Member Description
Activation ScreenReaderActivation: Automatic (default), AlwaysOn, Off.
IsScreenReaderOn The OS screen reader is on.
IsPlatformSupported Unity's module supports this platform and version.
IsBuilding The package is building the hierarchy.
IsPublished The hierarchy is the one the platform uses.
Hierarchy Unity's AccessibilityHierarchy, null while not building. Do not clear it.
Strings AccessibilityStrings, never null.
Canvases The enabled AccessibleCanvas scopes.
ScreenReaderStatusChanged, HierarchyChanged, FocusChanged, AnnouncementSent Events. A subscriber that throws is logged and the others still run.
Announce(string), NotifyScreenChanged(GameObject), NotifyLayoutChanged(GameObject) See Announcements.
Refresh() Scan again at the next update.
TryGetNode(GameObject, out AccessibilityNode), TryGetGameObject(AccessibilityNode, out GameObject) Map between controls and nodes.
CaptureSnapshot() AccessibilitySnapshot of the whole hierarchy.

AccessibleCanvas

Serialized properties: ReadingOrder (Layout), RightToLeft (false), RowTolerance (0.5), Modal (false), Order (0), SyncSelection (true), FollowSelection (false), InferNearbyLabels (true), HideTransparent (true), AnnounceOnEnable (true), UpdateInterval (0). Members: Nodes, TryGetNode, MarkDirty(), Refresh(), CaptureSnapshot(). A scope registers only in Play mode.

AccessibleElement

Properties Exposure, Role, Label, LabelSource, Hint, Value, Order, Step, Actions; events OnActivate, OnIncrement, OnDecrement, OnDismiss, OnFocusChanged; delegates LabelProvider, ValueProvider, HintProvider; method NotifyChanged().

Enums: AccessibleRole (Auto, None, Button, Toggle, Slider, StaticText, Header, Image, TextField, SearchField, Dropdown, ScrollView, Container, TabBar, TabButton, KeyboardKey), AccessibleStates (Disabled, Selected, Expanded), AccessibleActions (Activate, Increment, Decrement, Scroll, Dismiss), AccessibleScrollDirection, ScreenReaderActivation, ReadingOrder, AccessibleExposure (Default, Hidden, Group, Container). The package has its own role enum because the values of Unity's AccessibilityRole differ between versions.

Other types

AccessibilityStrings, AccessibilitySnapshot (Nodes, ScreenSize, Capture, ToText, ToJson, Compare), AccessibilitySnapshotNode, ScreenReaderSimulator, ScreenReaderDebugOverlay (ShowLabels, ShowInactive, Color, FocusColor, GuiDepth).

Troubleshooting and FAQ

Nothing is read. Check, in this order: there is an AccessibleCanvas on the Canvas or a parent; the Canvas and the controls are active; UguiScreenReader.Activation is not Off; a screen reader is actually on (IsScreenReaderOn); the platform is supported on your Unity version (IsPlatformSupported; Windows needs 6000.3). Then look at IsBuilding and IsPublished, or use the Hierarchy Viewer, the debug overlay or CaptureSnapshot().ToText().

IsBuilding is true but IsPublished is false. In a player Unity accepts the hierarchy only while the OS screen reader is on. Turn the reader on. See Activation modes.

A button has no label or the wrong one. The label is the readable texts inside the button. An icon-only button needs an AccessibleElement with a Label. The Validator lists these as MissingLabel.

A slider or input field reads without a name. Put the label text immediately before it, in the same row or just above, or set its AccessibleElement Label or Label Source.

Two controls read the same. The Validator reports DuplicateLabel. Give each an AccessibleElement Label such as "Delete Sword" and "Delete Shield".

The reading order is wrong. Layout order follows screen positions. Set Order on the elements, or use Reading Order Hierarchy. A layout group places its children one frame late; the order is corrected at the next update.

The reader can still reach the screen behind my dialog. The dialog needs its own AccessibleCanvas with Modal on, and it must be enabled while it is shown.

A dismiss gesture does nothing. Add an AccessibleElement on the dialog's root, declare Dismiss and close the dialog in On Dismiss. Not every reader sends a dismiss gesture; keep a visible close button.

A changed text is not read. Changes are not announced. Call UguiScreenReader.Announce.

A text from a delegate does not update. Call NotifyChanged() on the element.

Increment does nothing from the reader. Readers send increment and decrement only to Slider-role nodes. Give the element the role Slider.

The on-screen keyboard opens when I swipe to a field. It does not: the package does not select input fields on reader focus. Activating the field opens the keyboard.

The Hierarchy Viewer is empty. Enter Play mode, make sure the scene has an AccessibleCanvas, and set Activation = AlwaysOn if no reader is on.

Does it work with UI Toolkit? No. Unity's Accessibility module documents its own way to build a hierarchy for UI Toolkit; this package does not touch it.

Does it speak when no screen reader is on? No.

Does it need the Input System package? No. It reads no input devices.

Support

Product page: https://luanrobs.com/screen-reader-ugui/

Manual online: https://luanrobs.com/screen-reader-ugui/docs/

Changelog: https://luanrobs.com/screen-reader-ugui/changelog/

Email: luanrobs@gmail.com

I maintain and support this package myself. When you report a problem, include your Unity version, the platform and screen reader, and the output of UguiScreenReader.CaptureSnapshot().ToText() for the screen.