Accessibility
Expose your Compose semantics to VoiceOver, Narrator, Orca and UI automation tools.
Nucleus exposes your Compose semantics to VoiceOver on macOS, Narrator on Windows and Orca on
Linux. You write standard Compose semantics and screen readers read them. Every DecoratedWindow
comes with the bridge, part of nucleus-application.
Make your UI accessible
Attach Compose semantics to your composables. You never build accessibility nodes by hand:
Button(onClick = { count++ }, modifier = Modifier.testTag("increment")) {
Text("Increment")
}
Image(
painter = painterResource("logo.png"),
contentDescription = "Company logo",
)
Text(
"Loading",
modifier = Modifier.semantics { contentDescription = "Loading, please wait" },
)A screen reader sees the Button as a button it can activate and the Image as an image labeled
"Company logo". Nodes marked InvisibleToUser or HideFromAccessibility stay out of the OS tree.
When a screen reader activates, increments or edits an element, Nucleus runs the matching Compose
SemanticsActions handler on the UI thread. A read-only text field does not offer text editing to the screen reader.
Find elements from UI automation
Modifier.testTag(...) becomes a stable identifier that UI automation tools can query instead of
the visible label:
| Platform | Attribute |
|---|---|
| macOS | AXIdentifier |
| Windows | UIA_AutomationIdPropertyId |
| Linux | AccessKit author id |
What's next
- Windows: the
DecoratedWindowthat installs the bridge. - Linux and Wayland: Linux windowing, where AT-SPI goes through AccessKit.
- Pen and touch input: touchscreen and pen contacts.
Last updated on