[change] Map 'button' and 'paragraph' role to HTML elements

Fix #1899
Close #1944
This commit is contained in:
Nicolas Gallagher
2022-09-01 12:43:41 -07:00
committed by Nicolas Gallagher
parent 95c8a545a7
commit e8a0cbc60a
9 changed files with 29 additions and 30 deletions
@@ -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