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

Disable mandatory a11y hint #163

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

Conversation

ceceppa
Copy link
Member

@ceceppa ceceppa commented Oct 3, 2024

Description

Accessibility hint should be provided only when the results of an action are not evident from the element’s label.

Fixes #142

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • 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
  • I have run all builds, tests, and linting and all checks pass
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@carbonrobot
Copy link
Contributor

Would it better to modify the code so that it only applies to the correct places instead of disabling it entirely?

https://github.com/FormidableLabs/eslint-plugin-react-native-a11y/blob/master/src/rules/has-accessibility-hint.js

@ceceppa
Copy link
Member Author

ceceppa commented Nov 4, 2024

Would it better to modify the code so that it only applies to the correct places instead of disabling it entirely?

https://github.com/FormidableLabs/eslint-plugin-react-native-a11y/blob/master/src/rules/has-accessibility-hint.js

AFAIK, There are no "correct places" where an accessibility hint is needed. Even for the Pressable, the hint should be used rarely and depends on the app itself.
We can't safely suggest when it should be used. So, we either turn it off or remove that rule entirely.

@carbonrobot
Copy link
Contributor

Can you add a changeset for a patch using yarn changeset? Then we can merge and leave it disabled. If someone finds a way to target in the future we still have the code to modify.

Copy link

@lmccormick3 lmccormick3 left a comment

Choose a reason for hiding this comment

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

been waiting for this change for ages!

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.

why is the accessibilityHint enforced as mandatory?
3 participants