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

Block Directory: Use the block's title for alt text on block directory plugin items. #19263

Conversation

StevenDufresne
Copy link
Contributor

Description

We currently have a less than useful placeholder text ( 'block icon' ) for the icon that is associated to the block directory plugin. This PR grabs the blocks title, which cannot be blank, localizes it and adds it as the alt text.

This suggestion was spun out of a PR that was accepted and closed. See here:
https://github.com/WordPress/gutenberg/pull/16524/files#r324268820

Considerations:

I considered removing the alt tag altogether but this image feels more like content than something ornamental. (ref: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/)

How has this been tested?

The only applicable test is to inspect the <img> tag and locate the alt attribute.

Screenshots

None

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@MarcoZehe MarcoZehe merged commit 0553213 into WordPress:master Dec 23, 2019
@StevenDufresne StevenDufresne deleted the fix/block-directory-downloadable-block-header-img-alt branch December 24, 2019 01:26
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants