Skip to content
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

feat: adding aria-label alias for accessibilityLabel #34502

Conversation

Viraj-10
Copy link
Contributor

@Viraj-10 Viraj-10 commented Aug 26, 2022

Summary

#34424

Changelog

[General] [Added] - Add aria-label prop to Button, View, Pressable component

Test Plan

<Button
     onPress={() => onButtonPress('cancelled')}
     testID="cancel_button"
     color={theme.SystemRedColor}
     title="Cancel Application"
     aria-lable="Press to cancel your application!"
/>

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Aug 26, 2022
@Viraj-10
Copy link
Contributor Author

Hi @necolas, I Just Wanted to know if this is the right way. I will add other components if it's good to go. Open to suggestions.

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Aug 26, 2022
@Viraj-10 Viraj-10 changed the title feat: adding alias for aria-label feat: adding aria-label alias for accessibilityLabel Aug 26, 2022
@analysis-bot
Copy link

analysis-bot commented Aug 26, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,641,940 +498
android hermes armeabi-v7a 7,054,235 +501
android hermes x86 7,943,663 +498
android hermes x86_64 7,915,717 +492
android jsc arm64-v8a 9,515,205 +483
android jsc armeabi-v7a 8,290,815 +484
android jsc x86 9,454,534 +483
android jsc x86_64 10,045,602 +483

Base commit: 5e1c4d4
Branch: main

@analysis-bot
Copy link

analysis-bot commented Aug 26, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 5e1c4d4
Branch: main

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@necolas necolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs tests or RN tester example alongside where ever any accessibilityLabel tests/examples live

Libraries/Components/Button.js Outdated Show resolved Hide resolved
Libraries/Components/Button.js Outdated Show resolved Hide resolved
@cipolleschi
Copy link
Contributor

Hi @Viraj-10, could you rebase your branch, please?

@Viraj-10
Copy link
Contributor Author

Hi @Viraj-10, could you rebase your branch, please?

@cipolleschi, okay

@cipolleschi
Copy link
Contributor

@Viraj-10 I have to ask if you can rebase this PR again... Also thanks for applying the suggestions!

@cipolleschi
Copy link
Contributor

There are some errors in CI, could you have a look at them, please?

@cipolleschi
Copy link
Contributor

Hi @Viraj-10, there are still errors. You can see them here: https://app.circleci.com/pipelines/github/facebook/react-native/15336/workflows/555b206f-388d-4dbd-868e-4727297563be/jobs/283063

An example of those is:

/home/circleci/react-native/Libraries/Components/Pressable/Pressable.js
  226:5  error  Duplicate key 'accessibilityLabel'  no-dupe-keys
  227:5  error  Duplicate key 'accessibilityState'  no-dupe-keys

could you have a look at them?

@Viraj-10
Copy link
Contributor Author

Viraj-10 commented Sep 5, 2022

Hi @cipolleschi @necolas, Sorry for the delay. I guess I have added an alias in all the components possible. Please review Once and let me know.

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@Viraj-10
Copy link
Contributor Author

Viraj-10 commented Sep 9, 2022

Hi @cipolleschi, All test cases are passed and I have resolved all the merge conflicts.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @Viraj-10 in 720cdbc.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 9, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
- Adding [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) alias for [accessibilityLabel](https://reactnative.dev/docs/accessibility#accessibilitylabel)

facebook#34424

## Changelog

[General] [Added] - Add `aria-label` prop to `Button`, `View`, `Pressable` component

Pull Request resolved: facebook#34502

Test Plan:
```
<Button
     onPress={() => onButtonPress('cancelled')}
     testID="cancel_button"
     color={theme.SystemRedColor}
     title="Cancel Application"
     aria-lable="Press to cancel your application!"
/>
```

Reviewed By: NickGerleman

Differential Revision: D39055178

Pulled By: cipolleschi

fbshipit-source-id: 7513a4518dedd0834e99fa8e72b07e0dc0132b41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants