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/role to accessibility role mapping #34538

Conversation

madhav23bansal
Copy link
Contributor

Summary

This adds role alias for accessibilityRole, it unifies role and accessibilityRole as requested on #34424

Changelog

[General][Added] - Added role alias for accessibilityRole.

Test Plan

 <View
  role="slider"
  style={[
    {
      marginTop: 5,
      borderWidth: 1,
      borderRadius: 5,
      padding: 5,
    },
    this.state.showBorder
      ? {
          borderStyle: 'dotted',
        }
      : null,
  ]}>
  <Text style={{fontSize: 11}}>Dotted border style</Text>
</View>

@facebook-github-bot
Copy link
Contributor

Hi @madhav23bansal!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@madhav23bansal
Copy link
Contributor Author

Hi @necolas, I have added mapping as given in the examples, but I was a bit confused about the mapping of roles that exist on the web but do not exist on react native.

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label Aug 30, 2022
@analysis-bot
Copy link

analysis-bot commented Aug 30, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,637,929 +894
android hermes armeabi-v7a 7,049,928 +906
android hermes x86 7,939,891 +884
android hermes x86_64 7,911,921 +892
android jsc arm64-v8a 9,513,748 +530
android jsc armeabi-v7a 8,289,045 +541
android jsc x86 9,453,287 +509
android jsc x86_64 10,044,538 +531

Base commit: 5c109b3
Branch: main

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 30, 2022
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Aug 30, 2022
@analysis-bot
Copy link

analysis-bot commented Aug 30, 2022

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

Base commit: 5c109b3
Branch: main

@necolas
Copy link
Contributor

necolas commented Aug 30, 2022

I was a bit confused about the mapping of roles that exist on the web but do not exist on react native

I think the flow type should allow all the values supported on web. We just don't forward unsupported values to the inner component

@madhav23bansal
Copy link
Contributor Author

Hi @necolas, I have added all the roles supported on the web, just have not mapped them to View.

@facebook-github-bot
Copy link
Contributor

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

Libraries/Components/View/View.js Show resolved Hide resolved
Libraries/Components/View/View.js Outdated Show resolved Hide resolved
@necolas
Copy link
Contributor

necolas commented Aug 31, 2022

Thank you for all the follow-ups @madhav23bansal

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @madhav23bansal in a50e6fb.

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

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