-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add support for color picker #16
Comments
Yes, that would be a really nice feature. I also like the idea of adding support for not only hex but RGB (as shown in the screenshot - I'll add that as it's own issue) |
I was experimenting with it and I found that the native Here's a preview: However, |
Ooh that’s super interesting! I hadn’t even considered the native colour picker. I wonder how accessible it is too. This is definitely worth investigating 👍🏻 |
It has some accessibility issues and cross browser implementation issues, worth checking out the article which I shared above! |
Just read through the article and it’s really in depth. Question is whether it’s improved enough since the article was written or we attempt to make our own. I’m busy this weekend but can do some experimenting next week to see how it currently works with keyboard and screen reader. |
I guess if we go for manual implementation, it would be really complex. I hope we can leverage the native feature if all goes well. |
Can we use a web component? I don't know much about web components but this might be an option! |
I've tested the native color picker and it works ok with keyboard navigation but it's awful with a screen reader so unfortunately we can't really use it in the project. I'm not sure about web components, they'd have to be compatible with react and there's no guarantee that it would be more accessible either, unless they have an accessibility statement somewhere talking about it then it's often not something people focus on when making components. |
So are you willing to go with manual implementation? Wouldn't it be too complex? |
I am going to have a look to see if any other accessibility sites have a good implementation or how they approach it. Maybe there's an npm package or we could look how reactAria does it (if at all) Otherwise we could make it into another project where we create an accessible component then turn it into an npm package so others can use it too. I'm thinking it might be a long term thing to work on |
That's an amazing idea to turn it into a standalone project. And yeah, it will take a long time! |
I had a look at how the WebAIM contrast checker is built and they use the native input type=color but they also provide a separate input type=text so that those that can't use the color picker can input the color by writing it in themselves. Maybe this is something we could do too so that we have a color picker and then start a separate project to build our own version too. There we can experiment as much as we like because there's no time limit. The webAIM html looks like this:
|
Yeah that can be definitely done! |
Is your feature request related to a problem? Please describe.
No, this issue is not related to a problem. It's related to a completely new feature!
Describe the solution you'd like
A color picker will be a great update so that users don't have to type the hex code manually.
Additional context
The text was updated successfully, but these errors were encountered: