Accessibility, Semantics & Focus
Zero-overhead TalkBack AccessibilityNodeProvider, reactive Modifier.semantics, keyboard navigation, and FocusRequester.
Accessibility in Crow is built directly into CrowView via an AccessibilityNodeProvider over the LNode tree. It allocates zero accessibility objects until an assistive service (such as TalkBack or Switch Access) actually queries the tree.
Automatic Semantics from Unstyled Bases
Every unstyled component (ButtonBase, ToggleBase, SwitchBase, CheckboxBase, RadioButtonBase, Slider, tabs, dialogs, sheets) and every crow-material3 / crow-lens control automatically publishes:
- Correct semantic roles (
Button,Switch,Checkbox,RadioButton,Slider,Tab) - Live checked, selected, disabled, and adjustable range states
- Click, long-click, scroll, expand, collapse, dismiss, and text-editing actions
- Compose-style semantic merging for labeled controls
Custom Semantics (Modifier.semantics)
Attach reactive labels, headings, state descriptions, live regions, or custom actions to any node:
Box(
Modifier
.clickable { toggleFavorite() }
.semantics {
contentDescription { if (favorite) "Remove from favorites" else "Add to favorites" }
stateDescription { if (favorite) "Saved" else "Not saved" }
liveRegion = LiveRegion.Polite
},
) {
Icon(
symbol = Symbols.Rounded.Favorite,
style = if (favorite) SymbolStyle.Filled else SymbolStyle.Regular,
)
}- Tracked like
graphicsLayer: Whenfavoriteflips, only the semantic metadata updates and announces appropriately to TalkBack — zero layout or draw pass. - Subtree exclusion: Dormant
NavHostscreens, hiddenLoadingregions, exitingAnimatedVisibilityghosts, and inert screens beneath modal overlays are automatically hidden from TalkBack explore-by-touch. clearAndSetSemantics: Replace descendant semantics when a composite card should be read as one coherent announcement.
Keyboard Navigation & Focus
Crow includes a built-in FocusManager supporting hardware keyboards, D-pads, and accessibility traversal:
Modifier.focusable()participates in tree-orderTab/Shift+Tabtraversal and tracksInteraction.FOCUSED/Interaction.FOCUS_VISIBLE.FocusRequesterlets you programmatically move focus (for example, focusing a search input when a sheet opens).Modifier.onKeyEvent { ... }handlesEnter,Space,Escape, and arrow keys directly on the focused node.- Overlays automatically save focus on open, clear it (dismissing the IME), and restore focus to the trigger control when dismissed.
How is this guide?
Text Input & Crow Image
Direct InputConnection text editing with TextState, input/output transformations, and Coil-class hardware-bitmap image loading with crow-image.
File-Based & Typed Routing
Type-safe file-based routing via crow.routes, independent tab histories, modal sheets, guards, and BackStack/NavHost.