Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected block outline has insufficient color contrast #15269

Closed
karlgroves opened this issue Apr 30, 2019 · 4 comments
Closed

Selected block outline has insufficient color contrast #15269

karlgroves opened this issue Apr 30, 2019 · 4 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@karlgroves
Copy link

Selected block outline has insufficient color contrast

  • Severity: Medium
  • Affected Populations:
    • Low-Vision
    • Cognitively Impaired
  • Platform(s):
    • All / Universal
  • Components affected:
    • Block Editing

Issue description

When the mouse moves over a block, a bright blue outline appears.
However when keyboard focus is in a block or any of that block's
editing controls, the outline is a very light gray, the contrast of
which is below the minimum threshold of 3:1 for interface controls:

  • Rendered block border: #e3e5e7 (light gray) on #fff (white): 1.262:1

This makes it more difficult for low-vision users to see which block
they've moved into. If they're using the Arrow keys to move the
cursor, the block toolbar does not immediately appear, and therefore the
only way for users to identify which block they're in is this pale gray
border, and the text cursor.

Sufficient color contrast is important for users who have low-vision or
are color-blind, because content with a low contrast ratio may be
difficult or impossible for such users to see.

Issue Code
    .editor-block-list__layout .editor-block-list__block.is-selected>.editor-block-list__block-edit::before {
        outline: 1px solid rgba(145,151,162,.25);
    }

Remediation Guidance

Darken the outline color to achieve a minimum contrast ratio of 3:1 relative to the white background.

Recommended Code
    .editor-block-list__layout .editor-block-list__block.is-selected>.editor-block-list__block-edit::before {
        outline: 1px solid #949494;
    }

Relevant standards

1.4.11 Non-text Contrast (Level
AA)

Note: This issue may be a duplicate with other existing accessibility-related bugs in this project. This issue comes from the Gutenberg accessibility audit, performed by Tenon and funded by WP Campus. This issue is GUT-100 in Tenon's report

@gziolo gziolo added the Needs Accessibility Feedback Need input from accessibility label Apr 30, 2019
@mapk
Copy link
Contributor

mapk commented May 1, 2019

Thanks! This has definitely been on our list!
It was resolved recently in #14145.

I'm closing this as it has been fixed in a more recent version of Gutenberg.

Example:

borders

@mapk mapk closed this as completed May 1, 2019
@afercia
Copy link
Contributor

afercia commented May 1, 2019

it has been fixed in a more recent version of Gutenberg.

Maybe "fixed" is a bit optimistic :) I'd like to hear @karlgroves opinion on the new selected state indication for the blocks (See GIF above).

@mapk
Copy link
Contributor

mapk commented May 2, 2019

Also a duplicate of #12254.

@mapk mapk added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label May 2, 2019
@gziolo gziolo added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed Needs Accessibility Feedback Need input from accessibility labels May 4, 2019
@afercia
Copy link
Contributor

afercia commented May 8, 2019

For history, here's the screenshot from the WPCampus full report that relates to a previous implementation:

Screenshot 2019-05-08 at 19 06 21

Lengthy discussions and multiple PRs didn't help to quickly address this issue, see for example the original report in #10559 (closed the reopened), #12254, #11737, #12478, #14095, #13700, #14145, #14197.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

4 participants