Skip to content

feat: adding aria-label alias for accessibilityLabel - #34502

Closed
Viraj-10 wants to merge 42 commits into
react:mainfrom
Viraj-10:feat/adding-aria-label-alias-for-accessibilitylabel
Closed

feat: adding aria-label alias for accessibilityLabel#34502
Viraj-10 wants to merge 42 commits into
react:mainfrom
Viraj-10:feat/adding-aria-label-alias-for-accessibilitylabel

Conversation

@Viraj-10

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

Copy link
Copy Markdown
Contributor

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-botfacebook-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
Copy Markdown
ContributorAuthor

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-botreact-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Aug 26, 2022
@Viraj-10Viraj-10 changed the title feat: adding alias for aria-label feat: adding aria-label alias for accessibilityLabelAug 26, 2022
@analysis-bot

analysis-bot commented Aug 26, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a7,641,940+498
androidhermesarmeabi-v7a7,054,235+501
androidhermesx867,943,663+498
androidhermesx86_647,915,717+492
androidjscarm64-v8a9,515,205+483
androidjscarmeabi-v7a8,290,815+484
androidjscx869,454,534+483
androidjscx86_6410,045,602+483

Base commit: 5e1c4d4
Branch: main

@analysis-bot

analysis-bot commented Aug 26, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: 5e1c4d4
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@necolasnecolas left a comment

Copy link
Copy Markdown

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

Comment threadLibraries/Components/Button.js Outdated
Comment threadLibraries/Components/Button.js Outdated
@cipolleschi

Copy link
Copy Markdown
Contributor

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

@Viraj-10

Copy link
Copy Markdown
ContributorAuthor

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

@cipolleschi, okay

@cipolleschi

Copy link
Copy Markdown
Contributor

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

Comment threadLibraries/Components/View/ViewPropTypes.js
@cipolleschi

Copy link
Copy Markdown
Contributor

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

@cipolleschi

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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.

Comment threadLibraries/Components/Button.js Outdated
Comment threadLibraries/Components/View/View.js Outdated
Comment threadLibraries/Components/View/View.js Outdated
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@Viraj-10

Copy link
Copy Markdown
ContributorAuthor

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

@react-native-bot

Copy link
Copy Markdown
Collaborator

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

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.Type: EnhancementA new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Viraj-10@analysis-bot@facebook-github-bot@cipolleschi@react-native-bot@necolas