MobA11y Blog

N-ARIA: Native Mobile Accessibility, part 7 of 9

Notifications: Announcements, Labels and Roles

MobA11y ·

A screen can tell sighted people something that a screen reader never hears. Three common ways it happens:

  1. Success shown only as a picture: a thumbs-up appears and everyone who can see it thinks "Success!". A VoiceOver or TalkBack user hears nothing. Announce it: UIAccessibility.post(notification: .announcement, argument: "Saved") on iOS, a live region on Android (accessibilityLiveRegion, or liveRegion in Compose semantics).
  2. Icons with no names: a chain link, a globe and a compass mean something to the designer. Read aloud they're "button, button, button". Give each an accessibilityLabel on iOS or a contentDescription on Android.
  3. The wrong role: text that reads "TalkBack is Cool!, Button" makes people try to tap something that does nothing. The role comes from accessibilityTraits on iOS and the node's class name, or Role in Compose, on Android. Plain text shouldn't claim to be a button.
A thumbs-up on screen and a thought cloud saying Success
Three unlabeled icons: a link, a globe and a compass
Text read aloud as: TalkBack is Cool, Button, with question marks

All three are N-ARIA's basics: a name, a role, and telling people when something changes.

Next in the series