mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-02 10:35:54 +00:00
Add a note about accessibilityRole compat
This commit is contained in:
@@ -39,7 +39,10 @@ using `aria-label`.
|
|||||||
|
|
||||||
In some cases, we also want to alert the end user of the type of selected
|
In some cases, we also want to alert the end user of the type of selected
|
||||||
component (i.e., that it is a “button”). To provide more context to screen
|
component (i.e., that it is a “button”). To provide more context to screen
|
||||||
readers, you should specify the `accessibilityRole` property.
|
readers, you should specify the `accessibilityRole` property. (Note that React
|
||||||
|
Native for Web provides a compatibility mapping of equivalent
|
||||||
|
`accessibilityTraits` and `accessibilityComponentType` values to
|
||||||
|
`accessibilityRole`).
|
||||||
|
|
||||||
The `accessibilityRole` prop is used to infer an [analogous HTML
|
The `accessibilityRole` prop is used to infer an [analogous HTML
|
||||||
element][html-aria-url] to use in addition to the resulting ARIA `role`, where
|
element][html-aria-url] to use in addition to the resulting ARIA `role`, where
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const accessibilityComponentTypeToRole = {
|
|||||||
const accessibilityTraitsToRole = {
|
const accessibilityTraitsToRole = {
|
||||||
adjustable: 'slider',
|
adjustable: 'slider',
|
||||||
button: 'button',
|
button: 'button',
|
||||||
|
header: 'heading',
|
||||||
image: 'img',
|
image: 'img',
|
||||||
link: 'link',
|
link: 'link',
|
||||||
none: 'presentation',
|
none: 'presentation',
|
||||||
|
|||||||
Reference in New Issue
Block a user