Skip to content

WCAG: Color contrast on form inputs #11484

@ahukkanen

Description

@ahukkanen

Describe the bug

WCAG 2.1: 1.4.11 Non-text contrast

In the redesign, the color contrast requirements are not met on the form inputs. I have included a demonstrative screenshot within the screenshots section.

  • The background of the page is white (#ffffff)
  • The input border is greyish (#6b7280) with an opacity of 0.3 accounting to lighter grey against a white background (= #cfd2d7)
  • The input background is light grey (#fafbfc)

Using the WebAIM contrast checker we can check the contrast on these as follows:

  • Input border (#cfd2d7) as foreground against a white background (#ffffff) - contrast ratio 1.51:1
  • Input border (#cfd2d7) as foreground against the input background color (#fafbfc) - contrast ratio: 1.46:1

Neither of these passes WCAG 2.1: 1.4.11 (non-text contrast) which requires the contrast ratio to be 3:1. See the "Additional context" section for details.

To Reproduce

  1. Go to submit a new proposal
  2. Take a screenshot of the form
  3. Inspect the colors within the screenshot using a color picker
  4. Enter the colors to the WebAIM contrast checker
  5. See the insufficient contrast ratios

Expected behavior

I would expect the contrast ratio to be 3:1 as required by WCAG 2.1 AA level requirements.

Screenshots

Form input color contrast

Extra data

  • Device: (any)
  • Device OS: (any)
  • Browser: (any)
  • Decidim Version: 0.28.0.dev
  • Decidim installation: Alpha.Try

Additional context

https://www.w3.org/TR/WCAG21/#non-text-contrast
https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions