On this page

Interactive and semantic families reach assistive technology through the native host that fits their capability, while purely structural layout containers such as Surface render plain renderer Views:

  • Native widgets (switches, sliders, steppers, pickers, editors, date pickers, menus, dialogs, sheets) are UIKit and Android views. They expose their own role, value, adjustable actions and focus behavior, exactly as in any native app.
  • Pressable action families (Button, IconButton, CloseButton, ToggleButton, FloatingActionButton, LinkButton and PressableFeedback) render through PressSurface and its native PressableHost, which owns the press interaction, minimum hit target and accessibility traits.
  • Composed semantic families (pressable cards, chips, list rows, tabs, accordions, alerts, toasts) wrap their touch target or status region in Semantics, a native host view that sets the platform’s accessibility properties from React props.

Accessible names

Every interactive control requires an accessible name. On single-control families (Button, IconButton, Switch, Slider, TextField, and so on), the required label prop sets both the spoken name for assistive technology and the name agents see in a snapshot. Structured families expose names at more than one level:

  • Tabs: each entry in items provides the label that VoiceOver and TalkBack announce for that individual tab (and the name on that tab’s role: "tab" agent entry). Passing an optional label on Tabs.Root names the enclosing Tabs group entry (role: "group") for agents (which otherwise defaults to the selected tab’s label); VoiceOver still announces each tab from its item label.
  • Sheet: label names the trigger button for both assistive technology and agents, while title names the open sheet’s heading and its role: "dialog" agent entry.

Keep names stable while a control is busy or disabled; describe the state with the state props, not by changing the name. Icons are decorative and have no name of their own: an IconButton is named by its label.

The Semantics host

Use Semantics from nitro-ui-sdk/semantics for any custom control or meaningful group:

import { Semantics } from "nitro-ui-sdk/semantics";

<Semantics
  role="button"
  label="Add to favorites"
  hint="Saves this place to your list."
  selected={favorite}
  onActivate={() => toggle("user")}
  layout={{ minHeight: 44, minWidth: 44, alignItems: "center", justifyContent: "center" }}
>
  {/* the visual content */}
</Semantics>;

All props in the table below are optional:

Prop Type Description
label? string The spoken name.
role? SemanticRole button, checkbox, switch, radio, tab, link, image, text, slider, group, menuitem, alert, progressbar or search.
value? string The spoken value, such as “40 percent”.
hint? string What happens on activation.
selected? boolean The item is selected.
checked? "checked" | "unchecked" | "mixed" Checkbox and switch state.
disabled? boolean Spoken as dimmed or disabled; activation is ignored.
busy?, busyLabel? boolean, string A long-running action; busyLabel is spoken while busy.
heading? boolean Marks a heading for rotor and heading navigation.
accessibilityHidden? boolean Hides decorative content, such as a visual label already spoken by its control.
actions? { name, perform }[] Custom accessibility actions in the actions rotor.
onActivate? () => void Runs on ordinary native tap activation (.touchUpInside on iOS) as well as VoiceOver or TalkBack double-tap, unless disabled is true.

Semantics also accepts every NitroUI view prop (layout, style, gestures), so it can be the control’s root view instead of an extra wrapper.

Announcements

Announce outcomes that do not move focus, such as a saved form, a failed upload or a toast:

import { announce } from "nitro-ui-sdk/semantics";

announce("Draft saved");

Toast announces its message for you; FieldError is announced when it appears.

Touch targets

Every interactive family keeps a hit area of at least 44 points, even when the visible control is smaller (control.sm is 36 points high; its target is still 44 or more).

Motion and transparency

Pass the person’s settings to ThemeProvider: reducedMotion collapses animation durations to zero, and reducedTransparency replaces Liquid Glass with an opaque surface. isReduceTransparencyEnabled() reads the system setting. See Theming.

What to check by hand

Automated harness tests assert names, roles and states on iOS. Some behavior needs a person with a screen reader on a device:

  • The spoken order of composed rows and cards, and where focus lands after a sheet or dialog closes.
  • Spoken hints, Dynamic Type at the largest sizes, and right-to-left layouts in editors.
  • TalkBack on Android, which has not been verified (see Platform support).

Each component page lists its known gaps under Platform notes.