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(ArtistListItem): add accessibility props to the follow button #10703

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

Conversation

yinuoyang01
Copy link

@yinuoyang01 yinuoyang01 commented Sep 4, 2024

Description

fix accessibility issues of the follow button inside artist list card

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • fix: ArtistListItem followButton accessibility props - yinuoyang01

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

fix accessibility issues of the follow button inside artist list card
@artsy-peril
Copy link
Contributor

artsy-peril bot commented Sep 4, 2024

Warnings
⚠️ This PR is on a repo with limited CI support for open source contributors; the reviewers may need to check out your code locally to run the tests.

Generated by 🚫 dangerJS against 67a0eb6

@araujobarret
Copy link
Contributor

Hi @yinuoyang01, first thanks for the contribution!

Favor to ask, please don't delete the PR template, we rely on it for some automation on our end 🤖

I'll take the freedom to do it, but please remember to use it next time 😉

@araujobarret araujobarret changed the title Update ArtistListItem.tsx fix(ArtistListItem): add accessibility props to the follow button Sep 4, 2024
@araujobarret araujobarret self-assigned this Sep 4, 2024
<FollowButton haptic isFollowed={!!is_followed} onPress={handleFollowArtist} />
<FollowButton haptic isFollowed={!!is_followed} onPress={handleFollowArtist}
accessibilityLabel={is_followed ? "Unfollow " + name : "Follow " + name}
accessibilityRole="button" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use role instead of accessibilityRole and for the label the RN community is moving towards aria props, so let's use aria-label instead 👍

Comment on lines +173 to +174
accessibilityLabel={is_followed ? "Unfollow " + name : "Follow " + name}
accessibilityRole="button" />
Copy link
Member

Choose a reason for hiding this comment

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

Agree with @araujobarret, lets change that to what he suggested and ready to merge! Thanks for the contribution 😄

Suggested change
accessibilityLabel={is_followed ? "Unfollow " + name : "Follow " + name}
accessibilityRole="button" />
aria-label={is_followed ? "Unfollow " + name : "Follow " + name}
role="button"
/>

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.

3 participants