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

fix(ButtonGroup): add accessibility role to ButtonGroup Text #3822

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

areyesms
Copy link

@areyesms areyesms commented Aug 1, 2023

Motivation

The individual buttons created in ButtonGroup are non-compliant with Accessibility because they lack a Role, so the screen reader only mentions the text but not that the element is actionable. This PR adds the Accessibility Role 'button' since the components created in ButtonGroup are effectively buttons.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Checked with example app

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation using yarn docs-build-api
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for react-native-elements ready!

Name Link
🔨 Latest commit 93baf17
🔍 Latest deploy log https://app.netlify.com/sites/react-native-elements/deploys/64c9905de18e7100088d147c
😎 Deploy Preview https://deploy-preview-3822--react-native-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@areyesms areyesms changed the title Add accessibility role to ButtonGroup Text fix(ButtonGroup): add accessibility role to ButtonGroup Text Aug 1, 2023
@areyesms
Copy link
Author

areyesms commented Aug 1, 2023

@arpitBhalla could you please review this simple change? It is related to #3196.
However, in that issue, the author is asking for support when custom components are passed in as buttons, while this PR only addresses the case when text strings are passed as buttons and a Text component is created for each them. A lot of the comments in that issue request this.

@areyesms areyesms force-pushed the add-accessibility-role-to-buttongroup branch from 3262800 to 93baf17 Compare August 1, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant