Skip to content

Commit

Permalink
chore: fix migration guide role prop naming (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed Apr 5, 2023
1 parent 7eb1114 commit 7b02f51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/docs/MigrationV12.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ Following elements will match:

```ts
// Explicit "accessible" prop for View
<View accessible role="button" />
<View accessible accessibilityRole="button" />

// No need to "accessible" prop for Text, as it is implicitly accessible element.
<Text role="button">Button</Text>
<Text accessibilityRole="button">Button</Text>
```

While following elements will not match:

```ts
// Missing "accessible" prop for View
<View role="button" />
<View accessibilityRole="button" />

// Explicit "accessible={false}" prop for View
<View accessible={false} role="button" />
<View accessible={false} accessibilityRole="button" />

// Explicit "accessible={false}" for Text, which is implicitly accessible element
<Text accessible={false} role="button">Button</Text>
<Text accessible={false} accessibilityRole="button">Button</Text>
```

## 3. `*ByText`, `*ByDisplayValue`, `*ByPlaceholderText` queries now return host elements
Expand Down

0 comments on commit 7b02f51

Please sign in to comment.