0.15.0
This release introduces improved accessibility features and new documentation. It includes relatively minor breaking changes.
Breaking changes
- React 17 is a peer dependency.
- The
I18nManager
API has removed theisRTL
anddoLeftAndRightSwapInRTL
properties. They must now be accessed using thegetConstants()
method, which returns an object with the same properties. This was an undocumented breaking change in a previous version of React Native. - The
focusable
prop now determines whether an element appears in the keyboard tab flow. - The
hrefAttrs
prop has been added toText
andView
. The value is an object withrel
,target
, anddownload
properties. This replaces the undocumentedrel
andtarget
props. - The automatic addition of
rel="noopener"
to anchors has been removed. - The
Linking.openURL(url)
API now opens the url in new tab. - The
Linking
API now includes theaddEventListener
methods. - The deprecated
importantForAccessibility
prop has been removed. UseaccessibilityHidden
instead. - The undocumented
data-focusable
attribute has also been removed from rendered DOM nodes. - The undocumented
disabled
prop has been removed fromView
andText
; useaccessibilityDisabled
instead.
New features
- Pressable has added
onHoverIn
andonHoverOut
props. - All ARIA properties are now supported via equivalent
accessibility*
props. The undocumented support foraria-*
prop forwarding remains and will be removed in a future version. - Additional
accessibilityRole
values are mapped to HTML element equivalents. - CSS
aspectRatio
property is now available in browsers with support.
Deprecations
- The
accessible
prop is deprecated and will be removed in the next minor release. React Native for Web will follow React Native for Windows/macOS in removing this prop. Usefocusable
instead.
Documentation
This release will include a rewrite of the documentation site and interactive examples.
https://necolas.github.io/react-native-web/
The examples will be embedded in relevant pages via a Next.js-powered codesandbox, making it easy for people to fork the example app from their browsers.