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

Invisible input creates accessibility issue #23

Closed
scottaohara opened this issue Nov 9, 2017 · 2 comments
Closed

Invisible input creates accessibility issue #23

scottaohara opened this issue Nov 9, 2017 · 2 comments

Comments

@scottaohara
Copy link
Contributor

In trying to solve issues 21 and 22, an "invisible" input was added to allow for a no-rating option. However, for sighted keyboard users, this creates an issue as there is no indicator that this element has been selected.

For example:
Load up a demo with the markup currently outlined in the readme.

Attempt to tab through the interface with keyboard alone and you will find that there is no focus indicator to give guidance to sighted keyboard users.

I do not have a firm idea of a proper solution that might fit exactly with the design aesthetic you'd like to maintain for this project, but here is one thought I might entertain if I had the time to spend on it myself:

Reveal a text label indicating that there is no current rating when a user has focused on the no-rating input. This text label could be revealed above the stars, like one of those floating label patterns. Regardless, it should be noticeable so that a user can easily see a visible change when focus is on that element, or not.

I hope this provides you with at least an idea of how to fix this accessibility issue with the rating component.

Please let me know if there is anything I could further clarify.

@szynszyliszys
Copy link
Collaborator

szynszyliszys commented Nov 9, 2017

Hi @scottaohara , thanks for spotting this. Started playing with that and what comes to my mind is adding an empty span that fakes the outline around the stars when the no-rate input is focused. It could look like on the screenshot. I tested this and works fine, doesn't break the functionality. I tried to use no-rating label for that, but there was too much hacking to make it work and not break other styling. If you think this solves your problem and looks good, I can merge that tomorrow.
all star highlight

@scottaohara
Copy link
Contributor Author

Awesome, I had a similar idea but also wasn't sure how to incorporate it w/out having to add yet another element, or as you said, hacking away at the no-rating label.

Per the outline, I'd recommend making it a pixel thicker and a color that would have better contrast, as the example presented would be difficult for some users to see.

Thanks!

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

No branches or pull requests

2 participants