Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298840

Active toolbar tray has weak affordance and fails WCAG color criteria

$
0
0

Problem/Motivation

When a toolbar tray is open, the currently active tray is indicated as the "'odd one out". The current design uses a mild background gradient on the active button.

Screenshot of toolbar. The shortcuts tray is open.

Here the shortcuts tray is open, and is visually indicated as the active tray using a slightly different background colour. People who have difficulty perceiving this colour difference may not know which top-level item the current tray belongs to.

Some scenarios where this can have a negative impact:

  • People with visual impairments (various kinds).
  • Using your device in an environment with bright ambient lighting (near a window on a sunny day, for example).
  • Devices with a limited or adjusted colour space (e.g. using Windows high-colour themes, or macOS greyscale, or some other colour adjustment).

This doesn't satisfy two WCAG success criteria:
SC 1.4.1 Use of Color (level A).
SC 1.4.11 Non-text contrast (level AA). If we regard the current background gradient as indicating a state of a UI control (in this case "open" vs. "closed") then the colour difference doesn't have enough contrast.

Proposed resolution

Add a new signifier to the active toolbar tray, which doesn't rely on colour differences alone. Make more effective use of shape signifiers too.

A couple of ideas:

  • #7 adds a thick white border to the active toolbar button
  • #22 inverts the contrast of the active toolbar button

After much back and forth, there's now consensus that the approach proposed in #22 is the most accessible solution, and the design has been okayed.

Remaining tasks

  1. Design.
  2. Update CSS.
  3. Decide if we need any tests for this CSS-only fix.
  4. Front end framework manager review:
    • Is filter: invert(100%); legit CSS for core? We no longer support IE11, right?
    • Should we touch stable* or leave them unfixed?
  5. RTBC
  6. Commit

User interface changes

Improve the way the active toolbar tray is conveyed, for better visual accessibility.

Seven

Before

Toolbar active tray in Seven theme, before fix

After

Toolbar active tray in Seven theme, after fix

Claro

Before

Toolbar active tray in Claro theme, before fix

After

Toolbar active tray in Claro theme, after fix

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 298840

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>