To implement a component library that meets the accessibility requirements for Android, iOS and Web.
React Native Web enables rendering React Native components on the web. This allows us to create components for Android, iOS and Web in a single codebase.
Firstly, React Native Web has all the features to implement accessible web apps.
However, props spread from React Aria hooks don't always work with React Native web components (View, Pressable).
- role - needs to be passed as accessibilityRole
- tabIndex - needs to be set using focusable
- id - needs to be passed as nativeID
- onKeyDown can't be passed to Pressable - needs to be set using ref
React DOM elements (div, span, etc) work well with React Native Web and you can totally use that with React Aria. In that case, you may not need this library.