

Native-first, all-in-one React Native accessibility toolkit — screen reader focus order &
announcements (VoiceOver / TalkBack), physical (external) keyboard support, keyboard-connection
status, and iOS accessibility containers, on iOS and Android. Everything ships under a single
A11y.* namespace.
autoFocus, imperative focus via reftintColor, Android focus highlightUIAccessibilityContainer semantic grouping via a11yUIContaineruseIsKeyboardConnectedreact-native-a11y-state-patch alternative)useIsKeyboardConnected, useIsScreenReaderEnabledIt bundles the full feature set of four focused libraries into one self-contained package:
| Bundled library | What it brings |
|---|---|
react-native-a11y-order |
Screen reader focus order control & announcements |
react-native-external-keyboard |
Using & implementing physical keyboard features |
react-native-is-keyboard-connected |
Listening for hardware keyboard connection |
react-native-a11y-container |
iOS UIAccessibilityContainer semantic grouping |
Plus a built-in optimistic values workaround — an alternative to
react-native-a11y-state-patch —
that announces the predicted accessibility value the moment the user acts, instead of the stale one.
[!IMPORTANT] This package re-merges the focused libraries into one.
react-native-a11ywas originally split — for easier development and support — intoreact-native-a11y-order,react-native-external-keyboard,react-native-is-keyboard-connected, andreact-native-a11y-container. They are now mature, and this package recombines all of them — plus the optimistic-values workaround — under one unifiedA11y.*namespace. See The rework below.[!TIP] The focused packages stay published and are mutually exclusive — install exactly one. Use
react-native-a11yfor the complete toolkit; reach for a single focused package only if you need just that one capability.
yarn add react-native-a11y
cd ios && pod install
Get started with the getting started guide or jump straight to the component overview.
Everything is imported from the single A11y namespace, with imperative APIs, hooks, and
the keyboard-focus HOC at the top level.
Keyboard focus — A11y.Pressable, A11y.View, and A11y.Input are drop-in,
keyboard-focusable views:
import { A11y } from 'react-native-a11y';
import { Text } from 'react-native';
<A11y.Pressable
autoFocus
onPress={onPress}
focusStyle={{ backgroundColor: 'dodgerblue' }}
>
<Text>Press me with Space or Enter</Text>
</A11y.Pressable>;
Screen reader order & announcements — A11y.Order + A11y.Index define the traversal
sequence; announce posts a message:
import { A11y, announce } from 'react-native-a11y';
<A11y.Order>
<A11y.Index index={1}><Text>Read first</Text></A11y.Index>
<A11y.Index index={3}><Text>Read third</Text></A11y.Index>
<A11y.Index index={2}><Text>Read second</Text></A11y.Index>
</A11y.Order>;
announce('Changes saved');
A11y.View is one component that accepts both prop sets — give it keyboard props,
screen-reader props, or both. To add keyboard focus to a component the namespace doesn't
cover, wrap it with the withKeyboardFocus HOC.
[!NOTE] On iOS, long-pressing the spacebar does not fire a long press — iOS routes it through Full Keyboard Access. Use
Tab + M(the default "open context menu" command) instead, viaonContextMenuPress.
| Capability | Supported |
|---|---|
| New Architecture (Fabric / Turbo Modules) | ✅ |
| Old Architecture (Bridge) | ✅ |
| Bridgeless mode | ✅ |
| Expo (prebuild / bare) | ✅ |
New here? Start with the getting started guide, then follow a task-focused guide. The full docs index links everything.
Guides — physical keyboard
focusStyle, render propstintColor, Android focus highlightref.focus(), keyboardFocus(), autoFocusA11y.Input, focusType, blurTypeGuides — screen reader
A11y.Order + A11y.IndexA11y.Carda11yUIContainerA11y.FocusTrap / A11y.FocusFrameannounce / ScreenReader, A11y.PaneTitleGuides — new in the merge
useIsKeyboardConnected, useIsScreenReaderEnabledReference
Legacy.* imperative 0.7 shim-order, or -external-keyboardComponents
| Export | Purpose |
|---|---|
A11y.View |
Unified focusable View — screen-reader + keyboard props, all opt-in. |
A11y.Pressable |
Keyboard- and screen-reader-focusable Pressable. |
A11y.Input |
TextInput with keyboard focus support. |
A11y.Order / A11y.Index |
Declarative screen-reader traversal order. |
A11y.Card |
Card that keeps inner interactive elements accessible. |
A11y.FocusTrap / A11y.FocusFrame |
Confine screen-reader and keyboard focus to a region. |
A11y.PaneTitle / A11y.ScreenChange |
Screen / panel transition announcements. |
A11y.FocusGroup |
iOS focusGroupIdentifier grouping + shared tintColor. |
withKeyboardFocus(C) |
HOC that adds keyboard focus to any Pressable/Touchable-like component. |
API
| Export | Purpose |
|---|---|
announce / ScreenReader |
Reliable, navigation-aware announcements. |
Keyboard |
Dismiss the soft keyboard from a hardware keyboard. |
KeyboardFocus ref |
Imperative focus handle (focus, keyboardFocus, screenReaderFocus). |
| Hooks | useIsKeyboardConnected, useIsScreenReaderEnabled, useIsViewFocused, … |
| Focus-order props | orderId, order*, orderIndex, orderGroup, lockFocus. |
Legacy.* |
Imperative 0.7 focus-order shim (useFocusOrder, …). |
The original all-in-one react-native-a11y (0.7.0) was split into focused
packages to make each capability easier to develop, test, and support:
react-native-a11y-order — screen reader focus order & announcementsreact-native-external-keyboard — physical keyboard supportreact-native-is-keyboard-connected — hardware keyboard connection statusreact-native-a11y-container — iOS UIAccessibilityContainer groupingFeature work on all of them is now complete, and they are recombined here into a single,
self-contained react-native-a11y — rebuilt fresh from the modern packages (whose native
bridges are newer than the legacy 0.7.0 code), not patched on top of the old one. It also
folds in an optimistic-values workaround as an alternative to
react-native-a11y-state-patch.
What this means for you:
A11y.View / A11y.Pressable / A11y.Input takes
both screen-reader and keyboard props; each capability is opt-in. A single
A11y.FocusTrap / A11y.FocusFrame confines screen-reader and keyboard focus.react-native-a11y.Legacy.* for a near drop-in upgrade.Coming from 0.7 or any of the focused packages
(react-native-a11y-order, react-native-external-keyboard,
react-native-is-keyboard-connected, react-native-a11y-container)? Each path has its own
section in the migration guide.
Any type of contribution is highly appreciated. Feel free to create PRs, raise issues, or share ideas — see the contributing guide for the development workflow.
This library stands on the work behind all of its source packages. Thanks to the initial
authors Andrii Koval,
Michail Chavkin, and
Dzmitry Khamitsevich, and to everyone who contributed,
reported issues, and followed along across react-native-a11y-order,
react-native-external-keyboard, react-native-is-keyboard-connected, and
react-native-a11y-container.
MIT
Made with create-react-native-library
$ claude mcp add react-native-a11y \
-- python -m otcore.mcp_server <graph>