WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10k stars 4.02k forks source link

Accessibility issue with the Overlay functionality #44115

Open RahiDroid opened 1 year ago

RahiDroid commented 1 year ago

Description

Pull request https://github.com/WordPress/gutenberg/pull/43838 introduces an improved UX for the Post Featured Image block by incorporating the Overlay changes reflected on the image placeholder as well.

The upload button has a blurred background which is being removed in the mentioned PR to ensure it's visible what the overlay will look like. However, this has a drawback, if a user selects an overlay that's very close to the upload button's color, it will blend in which is an accessibility or UX issue.

It's important to address this as we have plans on introducing the overlay color on the Cover block's placeholder as well.

Step-by-step reproduction instructions

  1. Ensure you have latest Gutenberg plugin installed and activated.
  2. Either open the site editor or, if using the block editor, ensure it has no featured image assigned.
  3. Add the Post Featured Image block. You should see the placeholder for the image.
  4. Assign custom overlay color to be same as the upload button (#007CBA is the upload button's color as of today).
  5. Ensure the overlay opacity is set to 100.

Screenshots, screen recording, code snippet

Screenshot 2022-09-13 at 3 21 50 PM [Overlay color set to the upload button's color with overlay opacity being 100]

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

RahiDroid commented 1 year ago

Hi @mikachan 👋

Could you please tag relevant folks who can provide UX/UI inputs on this one? Once this gets addressed, we could then work towards introducing this placeholder UX change for the Cover block, too.

mikachan commented 1 year ago

Yes, sure. @Ryokuhi or @alexstine may be able to offer input on this one. You may also wish to bring this issue up in the #accessibility channel on the Making WordPress Slack, as well.

alexstine commented 1 year ago

I am totally blind so I can't offer much feedback here any longer. Tagging @joedolson .

Ryokuhi commented 1 year ago

To the best of my knowledge, if we talk about compliance with Web Content Accessibility Guidelines (WCAG), version 2.1, at level AA, which is what we aim to do according to WordPress Accessibility Coding Standards, maybe this is not even an accessibility issue, strictly speaking.

The relevant success criterion here is 1.4.11 Non-text Contrast. After checking the additional content included in the guide to understand the intent of Success Criterion 1.4.11: Non-text Contrast, here are my thoughts on the topic.

Let's hear from someone else from the Accessibility Team (we can even discuss this during the next bug scrub); after there's enough feedback, we can decide about removing the Needs Accessibility Feedback and the Accessibility (A11y) labels.

joedolson commented 1 year ago

I agree with @ryokuhi that the biggest problem is identifying the boundaries; so a simple white border around the button should be sufficient. While testing, I noted that the upload button doesn't support the 'Show button text labels' preference, which I'd consider a more significant problem, in many ways.

RahiDroid commented 1 year ago

Thank you so much @Ryokuhi and @joedolson, for the detailed evaluation of the issue raised and for sharing your thoughts on the possible solution!

so a simple white border around the button should be sufficient

Understood. Do we need any input from the design team for this? Else, I can raise a PR and you can review the visuals.

the upload button doesn't support the 'Show button text labels' preference

Could you please elaborate a little? Are you referring to the aria-label attribute on the upload button?


Aside, I found a blurred effect with a slight tint on the placeholder illustration, which needs some discussion (it's related to design and not accessibility). I will create a separate issue as it's not exactly related to this.

joedolson commented 1 year ago

In Options > Preferences > General, there's an option to 'Show button text labels'. The expected result of this is that all icon buttons should instead be represented by descriptive text; this doesn't happen with featured image button.

image Relevant setting

image Block settings showing text replacements on toolbar but not on featured image icon.

RahiDroid commented 1 year ago

Gotcha! @joedolson, I have raised a PR (https://github.com/WordPress/gutenberg/pull/44437) for the accessibility issue you pointed out, it also addresses one UI bug seen in your screenshot and adds consistency in the spacing of those items.

Would be great if you could take a look and help me with any feedback.