Skip to content

chore: fix migration guide role prop naming #1382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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