Skip to content

[EuiCombobox] Placeholder color contrast too low #4703

Closed

Description

@barlowm

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.
User_Contrast
This issue occurs on drop downs within all Management pages.

Kibana Version:
7.10

OS:
Windows 10

Browser:
Chrome

Screen reader: [if relevant]
NVDA

Relevant WCAG Criteria: WCAG Criterion - Level A/AA/AAA
1.4.3 Contrast (Minimum) - Level AA
The visual presentation of text and images of text has a contrast ratio of at least 4.5:1

Relevant ARIA spec: WAI-ARIA Authoring Practices
N/A

Activity

  1. elasticmachine commented on Apr 8, 2021

    @elasticmachine
    Collaborator

    Pinging @elastic/kibana-accessibility (Project:Accessibility)

  2. elasticmachine commented on Apr 8, 2021

    @elasticmachine
    Collaborator

    Pinging @elastic/kibana-security (Team:Security)

  3. myasonik commented on Apr 8, 2021

    @myasonik
    Contributor

    Hey Secuirty team! I couldn't find this UI on master anymore, is that right? If so, we might able to just close.

  4. legrego commented on Apr 12, 2021

    @legrego
    Member

    @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.

  5. transferred this issue fromelastic/kibanaon Apr 12, 2021
  6. changed the title [-](Accessibility)- Management - Insufficient Contrast [/-] [+][EuiCombobox] Placeholder color contrast too low[/+] on Apr 12, 2021
  7. snide commented on Apr 13, 2021

    @snide
    Contributor

    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.

  8. myasonik commented on Apr 13, 2021

    @myasonik
    Contributor

    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.

  9. snide commented on Apr 13, 2021

    @snide
    Contributor

    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.

  10. myasonik commented on Apr 13, 2021

    @myasonik
    Contributor

    :/

    So what do we do in cases where the placeholder is being used instead of a label?

  11. cchaos commented on Apr 19, 2021

    @cchaos
    Contributor

    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

  12. cchaos commented on Apr 19, 2021

    @cchaos
    Contributor

    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.

  13. myasonik commented on Apr 19, 2021

    @myasonik
    Contributor

    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.

  14. self-assigned this
    on Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions