Skip to content

Commit

Permalink
chore: Update Text props aria-labelledby documentation (#35327)
Browse files Browse the repository at this point in the history
Summary:
`aria-labelledby` Flow types were added to the Text props on f353119  but the text component does not support `accessibilityLabelledBy`, which is the prop we were supposed to map `aria-labelledby` to. As the Text component does not really support `aria-labelledby` this PR updates the `TextProps` documentation to explain that this prop is necessary for cross-platform purposes and that other platforms need it.

## Changelog

[Android] [Changed] - Add notes to `aria-labelledby` from Text props

Pull Request resolved: #35327

Test Plan: Ensure CI is green

Reviewed By: necolas

Differential Revision: D41280877

Pulled By: lunaleaps

fbshipit-source-id: 81cf016bcf3117f15385ddd119c44d6f9fdd6b68
  • Loading branch information
gabrieldonadel authored and facebook-github-bot committed Nov 15, 2022
1 parent 5cdf3cf commit 72d3da1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Libraries/Components/View/ViewPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export type ViewProps = $ReadOnly<{|
'aria-hidden'?: ?boolean,

/**
* It reperesents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
* It represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
*
* @platform android
*/
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/ImageProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export type ImageProps = {|
'aria-label'?: ?Stringish,

/**
* Reperesents the nativeID of the associated label. When the assistive technology focuses on the component with this props.
* Represents the nativeID of the associated label. When the assistive technology focuses on the component with this props.
*
* @platform android
*/
Expand Down
5 changes: 2 additions & 3 deletions Libraries/Text/TextProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ export type TextProps = $ReadOnly<{|
'aria-selected'?: ?boolean,

/**
* Reperesents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
*
* @platform android
* Represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
* This prop is listed for cross-platform reasons and has no real effect on Android or iOS.
*/
'aria-labelledby'?: ?string,

Expand Down

0 comments on commit 72d3da1

Please sign in to comment.