Problem/Motivation

The Image Button element is missing an alt attribute. My accessibility validator said it's a violation of WCAG 1.1.1, which is the section on providing text alternatives for non-text content.

I checked the ImageButton class to see if this is a core bug, but it isn't. #title properties in an image_button render array are entered into the alt attribute. But the Style Guide's implementation doesn't have a #title. For some reason it has a #name instead.

Proposed resolution

Change the image button's #name to a #title.

Issue fork styleguide-3478665

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dcam created an issue. See original summary.

dcam’s picture

Status: Active » Needs review

  • dcam committed 345f0605 on 2.x
    Issue #3478665 by dcam: Image Button is missing an alt attribute
    
dcam’s picture

Status: Needs review » Fixed

dcam changed the visibility of the branch 3478665-image-button-alt to hidden.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.