-
Notifications
You must be signed in to change notification settings - Fork 844
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
[Form controls] Better indicators for invalid state #2017
Comments
I definitely support adding more indicators to our forms about error states. Currently, by only indicating errors through color, we fail to meet WCAG level A guidelines for accessibility guidelines (more at Use of Color guidelines). |
For current accessibility needs, EUI does provide styles for adding error/help text which we highly recommend: https://elastic.github.io/eui/#/forms/form-validation |
I think accessible by default (or, at least, closer to it) would be a good step forward. Leaving it up to the implementing developer as optionally accessible more often then not results in a lot of inaccessible usage. But even with the error copy, the only thing that differentiates error copy and help copy is, again, color. So if you didn't notice the form changing color, noticing some new error copy is also probably pretty difficult. Regardless of how the icon indicator shakes out, another options is requiring inline error copy (which could be improved to differentiate it better as well). This would also help with issues around long forms like in #1854. |
@myasonik Thanks for the feedback. To be clear, I was not suggesting what we have is enough, just pointing out that we have other things which can mitigate the current situation. |
As an addition to this, we should be able to continue to indicate invalid states when in focus. Per @mbondyra's comment in another issue:
|
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
This is a forever, yes. |
I've done most of the pre-work in #5738 and most of the simple controls. I'm removing myself as assignment and opening for anyone to tackle the other components. |
At the moment, we just add a red underline. Let's consider adding an icon on the right side of the input as well. This is best for accessibility for those with color-blindness that find it hard to detect the difference between blue and red.
Also, we keep running into issues where the focused state (blue line) overrides the invalid state making it unclear that certain (mostly number) inputs are invalid as the user types.
Guidelines Example:
Components to update:
The text was updated successfully, but these errors were encountered: