You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiCombobox] Placeholder color contrast too low #4703
On the Kibana Manage users page (/app/management/security/users/), create a new user, the "Add roles" drop down has insufficient contrast (2.5:1), minimum required is 4.5:1.
This issue occurs on drop downs within all Management pages.
Regardless, this sounds like a contrast issue within EUI, and not this page specifically -- as far as I know, this version of the screen didn't customize the styling in any way.
We've talked about this one a bit internally over the years. This is one of the few places I feel the accessibility guidelines are problematic. Not being able to tell what is / isn't a placeholder is a worse problem than the contrast level of placeholders being legible overall.
I'm sure there's some debate in this, but off-hand I would continue to make an exception to the rules here.
I think we could still hit the requirements with a gray for placeholders and the normal black that we have for text.
If we always had labels with our inputs, I could more easily see your argument but we don't so our placeholders also have to do double duty as labels as well sometimes... Which is what I'm more concerned about...
Another option maybe you'd like better, we could try to detect if there's a visible label and only apply the more stringent requirements if not... That would could hit some sort of middle ground.
I think we could still hit the requirements with a gray for placeholders and the normal black that we have for text.
We can definitely hit the requirements. The problem is that people can't read them as placeholders when we do. Since placeholders often convey example values, rather than instruction (like help text / labels). This leads to people thinking that forms are already filled out. That isn't as likely to happen when the contrast between a placeholder and actual user text is larger.
I agree that generally placeholder text having high contrast is misleading to what is filled in and what is not and there really should not be anyone who is using the placeholder as the label. But that's not something we can control/enforce (at this time).
I'm inclined to go ahead and increase the contrast of the EuiComboBox's placeholder, though, to match those of the other inputs. Somehow this component is not using the same text color as the others. So consistency is at least something we can achieve.
The hope/guidance would be that anyone using placeholders should ensure they read as placeholders. For instance it's pretty clear that select/combo boxes are displaying placeholder text when they say Select a [thing].
@myasonik Can you make a PR for the combo box placeholder text? You'll find the selector in src/components/combo_box/combo_box_input/_combo_box_placeholder.scss
Activity
elasticmachine commentedon Apr 8, 2021
Pinging @elastic/kibana-accessibility (Project:Accessibility)
elasticmachine commentedon Apr 8, 2021
Pinging @elastic/kibana-security (Team:Security)
myasonik commentedon Apr 8, 2021
Hey Secuirty team! I couldn't find this UI on master anymore, is that right? If so, we might able to just close.
legrego commentedon Apr 12, 2021
@myasonik this UI was recently redesigned, so it's possible that this is no longer an issue: elastic/kibana#87133
Regardless, this sounds like a contrast issue within EUI, and not this page specifically -- as far as I know, this version of the screen didn't customize the styling in any way.
[-](Accessibility)- Management - Insufficient Contrast [/-][+][EuiCombobox] Placeholder color contrast too low[/+]snide commentedon Apr 13, 2021
We've talked about this one a bit internally over the years. This is one of the few places I feel the accessibility guidelines are problematic. Not being able to tell what is / isn't a placeholder is a worse problem than the contrast level of placeholders being legible overall.
I'm sure there's some debate in this, but off-hand I would continue to make an exception to the rules here.
myasonik commentedon Apr 13, 2021
I think we could still hit the requirements with a gray for placeholders and the normal black that we have for text.
If we always had labels with our inputs, I could more easily see your argument but we don't so our placeholders also have to do double duty as labels as well sometimes... Which is what I'm more concerned about...
Another option maybe you'd like better, we could try to detect if there's a visible label and only apply the more stringent requirements if not... That would could hit some sort of middle ground.
snide commentedon Apr 13, 2021
We can definitely hit the requirements. The problem is that people can't read them as placeholders when we do. Since placeholders often convey example values, rather than instruction (like help text / labels). This leads to people thinking that forms are already filled out. That isn't as likely to happen when the contrast between a placeholder and actual user text is larger.
myasonik commentedon Apr 13, 2021
:/
So what do we do in cases where the placeholder is being used instead of a label?
cchaos commentedon Apr 19, 2021
I agree that generally placeholder text having high contrast is misleading to what is filled in and what is not and there really should not be anyone who is using the placeholder as the
label. But that's not something we can control/enforce (at this time).I'm inclined to go ahead and increase the contrast of the EuiComboBox's placeholder, though, to match those of the other inputs. Somehow this component is not using the same text color as the others. So consistency is at least something we can achieve.
The hope/guidance would be that anyone using placeholders should ensure they read as placeholders. For instance it's pretty clear that select/combo boxes are displaying placeholder text when they say
Select a [thing].@myasonik Can you make a PR for the combo box placeholder text? You'll find the selector in
src/components/combo_box/combo_box_input/_combo_box_placeholder.scsscchaos commentedon Apr 19, 2021
We might also want to add a global Sass for this text color. Right now it's hard coded in the forms mixins as
$euiColorDarkShade.myasonik commentedon Apr 19, 2021
Consistency will at least be a step in the right direction 👏
I'm going to mark it as "good first issue" for now but keep it on my radar. I know it's a small PR but I don't know when I'll get to it.