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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ARIA attributes on ranges #177

Merged
merged 4 commits into from
Jul 29, 2022

Conversation

aitchiss
Copy link
Contributor

@aitchiss aitchiss commented Feb 24, 2022

Fixes #171

In the Hue component:

  • aria-valuetext has been changed to aria-valuenow. Since the "human understandable" value is numeric, we don't need both valuetext and valuenow, and valuenow is the "required" attribute
  • aria-valuemin has been set to 0 and aria-valuemax has been set to 360 to provide a bit more context for screen reader users

In the Alpha component:

  • aria-valuenow has been added. This is in addition to aria-valuetext. Screen readers will generally read out the more understandable valuetext, but valuenow is a required attribute to accompany it
  • aria-valuemin has been set to 0 and aria-valuemax has been set to 100

In the Saturation component:

No change has been made! I don't believe there is an available numeric representation of the current value, so in this case I believe we can omit aria-valuenow for the time being until #152 is addressed.

Snapshot tests have been updated to reflect the new attributes 馃檪

Check out the docs for aria-valuenow for more context

@omgovich omgovich self-requested a review February 25, 2022 08:43
@omgovich
Copy link
Owner

Oh, wow! Thanks a lot for this contribution! I'll check it as far as I can!

royeden added a commit to royeden/react-colorful that referenced this pull request Jun 25, 2022
@omgovich
Copy link
Owner

Tested it locally with VoiveOver and added a simple test for that. Everything works well.
Thanks again!

@omgovich omgovich merged commit e708512 into omgovich:master Jul 29, 2022
@aitchiss
Copy link
Contributor Author

aitchiss commented Aug 3, 2022

Thank you @omgovich!

@smellai
Copy link

smellai commented Aug 25, 2022

@aitchiss thanks for this improvement!
@omgovich looks like the demo in the homepage is not updated yet with this change?

Looking forward the fix for #152 too

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.

Slider ARIA properties
3 participants