Wizard page step indicators fail WCAG AA color contrast

Created on 14 September 2023, over 1 year ago
Updated 24 July 2024, 5 months ago

Problem/Motivation

When a webform uses the wizard element to create a multi-step(page) form, the step indicators at the top of the page fail color contrast.

Steps to reproduce

  • Create a new webform
  • Add a the wizard form element
  • Add form elements as subs of the wizard element
  • Add another wizard form element
  • Add form elements as subs of the 2nd wizard element
  • Save and view the webform

Proposed resolution

Update the styles of the wizard elements to use text colors with appropriate color contrast. The USWDS has an accessible step indicator component. https://designsystem.digital.gov/components/step-indicator/

πŸ› Bug report
Status

Active

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jdearie

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jdearie
  • πŸ‡ΊπŸ‡ΈUnited States jdearie

    Changing the text color of webform-progress-tracker .progress-step .progress-text to #5c5c5c might be all that's needed.

  • πŸ‡ΊπŸ‡ΈUnited States cherrypj

    The color contrast between the blue (#2196f3) background behind the active page number (which is #fff) is also too low, at 3.12.

  • πŸ‡ΊπŸ‡ΈUnited States robpowell Boston

    This is also an issue with the form tool tip

  • The 6.1 version of this project is no longer recommended. Can someone re-test on 6.2.0 and also indicate with which theme you tested?

  • πŸ‡ΊπŸ‡ΈUnited States cherrypj

    My screenshot was from 6.2.0-beta6, if that helps.

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    A foreground text color of #777 against a standard light background #FFF does not pass WCAG AA nor AAA.

    Changing foreground #777 to #767676 against white background passes WCAG AA, but not WCAG AAA.
    Changing foreground #777 to #595959 against white background passes WCAG AA and AAA.

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    536 pass
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    I think we should meet Level AAA.

  • Pipeline finished with Success
    11 months ago
    Total: 1941s
    #78903
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    536 pass
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    After digging in here, it became quickly apparent that:

    * The default colors provided by the progress-tracker library that webform uses are also not compliant.
    * Webform module overrides some of the colors, most likely for consistency sake. It is not entirely clear why (the additions were made 7 years ago by Jacob).
    * Hover effects on elements that cannot be clicked are useless and should be corrected.
    * Hovering the "progress-marker" has a different/inconsistent effect than hovering the "progress-text".

    These things were all fixable with css changes captured in the previous commit d6179319 "Simplify complete/hover/focus states and pass WCAG AA".

  • Pipeline finished with Success
    11 months ago
    Total: 2146s
    #78925
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.4 + Environment: PHP 8.2 & MySQL 8
    last update 6 months ago
    536 pass
  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    I have rebased the merge request.

    @jwilson3 do your additional finding suggest further changes that you would like to make?

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦
  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    do your additional finding suggest further changes that you would like to make?

    No, everything I listed there had already been fixed by my commits. My apologies if that wasn't clear.

    The issue should be Needs Review at this point for someone else to have a look, and do an accessibility and functional review.

    However...

    After I'd done the work, you requested in #10 we add WCAG AAA support, which I haven't been able to come back around to work on. My work is explicitly WCAG AA.

    I don't know if it makes sense to try for AAA-level support here, or move it to a follow-up. To avoid scope creep, AAA should be addressed on this issue ONLY IF the module supports AAA already. But if the module has many other AAA-compatibility issues, then I suggest moving that to a follow-up, so things can be more holistically approached. Furthermore, AAA color contrast fixes, if done on a component-by-component basis, can end up introducing an even more inconsistent form look-and-feel if not addressed holistically across all components with a color strategy.

  • πŸ‡¨πŸ‡¦Canada Liam Morland Ontario, CA πŸ‡¨πŸ‡¦

    I was referring to AAA only for contrast. Usually, it's not hard to find colors which meet that.

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    okay, right. Color contrast does make sense to keep in scope here, Liam. Thanks.

Production build 0.71.5 2024