mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-25 23:48:54 +00:00
[change] Map 'button' and 'paragraph' role to HTML elements
Fix #1899 Close #1944
This commit is contained in:
committed by
Nicolas Gallagher
parent
95c8a545a7
commit
e8a0cbc60a
@@ -277,13 +277,11 @@ The value of the `accessibilityRole` prop is used to infer an [analogous HTML el
|
||||
</View>
|
||||
/*
|
||||
<article>
|
||||
<div role="paragraph">This is an article</div>
|
||||
<p>This is an article</p>
|
||||
</article>
|
||||
*/
|
||||
```
|
||||
|
||||
The `"paragraph"` role isn't mapped to a `<p>` tag because it's an HTML conformance error to include block-level children within the element; both `Text` and `View` support block-level children.
|
||||
|
||||
If the `"heading"` role is combined with an `accessibilityLevel`, the equivalent HTML heading element is rendered. Otherwise, it is rendered as `<h1>`.
|
||||
|
||||
```jsx
|
||||
|
||||
Reference in New Issue
Block a user