Skip to content

Commit

Permalink
Fix: accessibilityLabel is a string (#850)
Browse files Browse the repository at this point in the history
I noticed RN docs mention type "node" in most place (except button, why? no idea).
But in practise, it seems codebase has this typed as string, see https://github.com/facebook/react-native/search?p=2&q=accessibilitylabel&unscoped_q=accessibilitylabel
You can notice that ios & android implementation explicitly use string (same for the (react-native-)web).
The only place we see node in the codebase, is in the deprecated props, see https://github.com/facebook/react-native/blob/408207b356849ca3cefad0ce91a3889e73bd8682/Libraries/DeprecatedPropTypes/DeprecatedImagePropType.js#L34
  • Loading branch information
MoOx authored and charpeni committed Apr 7, 2019
1 parent 33b9969 commit 90738b4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ More details about `resize` and `scale` can be found at http://frescolib.org/doc

The text that's read by the screen reader when the user interacts with the image.

| Type | Required | Platform |
| ---- | -------- | -------- |
| node | No | iOS |
| Type | Required | Platform |
| ------ | -------- | -------- |
| string | No | iOS |

---

Expand Down
6 changes: 3 additions & 3 deletions docs/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ An accessibility hint helps users understand what will happen when they perform

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.

| Type | Required |
| ---- | -------- |
| node | No |
| Type | Required |
| ------ | -------- |
| string | No |

---

Expand Down
6 changes: 3 additions & 3 deletions docs/touchablewithoutfeedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ An accessibility hint helps users understand what will happen when they perform

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.

| Type | Required |
| ---- | -------- |
| node | No |
| Type | Required |
| ------ | -------- |
| string | No |

---

Expand Down
6 changes: 3 additions & 3 deletions docs/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ An accessibility hint helps users understand what will happen when they perform

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the `Text` nodes separated by space.

| Type | Required |
| ---- | -------- |
| node | No |
| Type | Required |
| ------ | -------- |
| string | No |

---

Expand Down

0 comments on commit 90738b4

Please sign in to comment.