-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
About the 2d slider #152
Comments
Hi! 👋 Thanks for using react-colorful and for the issue. I'll dig into the problem and try to roll out an approach that would provide better a11y and keep the bundle size as small as possible 👌 |
Saturation and Hue components should accept props from user, so that we could override aria-* attributes. This way I could just pass something like
This also solves issue with hardcoded strings if I need non-english labels. |
Hey guys! Don't think I forget about you. I've been discussing the issue with guys that know more about a11y than me. The thing that bothers me much and I still didn't get — which element must take the focus? |
Hey @diegohaz. Could you please check https://omgovich.github.io/react-colorful/ I deployed a version with |
Yeah! I can see the same behavior. VoiceOver also has its own shortcut keys to navigate grids, and they don't seem to work with this virtualized grid approach. Have you tried the solution with two sliders? |
Not sure I understand how to make it work 😞 The thing is we need to set focus on the entire brightness/saturation area, but I don't understand how to do that if there are two separate div-s with |
Currently, the saturation and brightness picker is using a single
role="slider"
element, which is supposed to be one-dimensional, but is being used to control a two-dimensional pane.One of the problems with this approach is the lack of
aria-valuenow
, which is a required attribute on sliders, but can't be set here because it's dealing with two different axes.This may be also confusing for screen reader users who expect the slider to work as described in the WAI-ARIA docs.
One of the solutions is using a
role="grid"
element. This has been discussed on w3c/aria#432. The markup could be something like this:Another solution would be having two sliders:
Moving the arrow keys perpendicularly to the currently focused slider would move focus onto the other slider.
None of these solutions should affect the current layouts.
The text was updated successfully, but these errors were encountered: