Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51846 closed defect (bug) (fixed)

The "alt" attribute missing on the image tag

Reported by: laxman-prajapati's profile Laxman Prajapati Owned by: audrasjb's profile audrasjb
Milestone: 5.7 Priority: normal
Severity: normal Version:
Component: Customize Keywords: has-patch commit needs-testing-info
Focuses: accessibility, coding-standards Cc:

Description

The "alt" attribute missing on the image tag, Which is need as a standard workflow. So I have added the "alt" attribute on the image tag.

Attachments (1)

51846.patch (689 bytes) - added by Laxman Prajapati 4 years ago.
Added "alt" attribute on the image tag.

Download all attachments as: .zip

Change History (11)

@Laxman Prajapati
4 years ago

Added "alt" attribute on the image tag.

#1 @Laxman Prajapati
4 years ago

  • Keywords has-patch added

#2 @johnbillion
4 years ago

  • Focuses accessibility added
  • Version trunk deleted

#3 @sabernhardt
4 years ago

  • Component changed from General to Customize

That image tag is a hidden placeholder in the Customizer preview when no logo is chosen. There is no src attribute for it either.

While the attribute would be unnecessary, I like the idea of adding it anyway.

This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.


4 years ago

#5 @ryokuhi
4 years ago

  • Keywords needs-testing added
  • Owner set to joedolson
  • Status changed from new to assigned

#6 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.7

#7 @audrasjb
4 years ago

  • Keywords commit added; needs-testing removed
  • Owner changed from joedolson to audrasjb

Just tested the patch: it applies well against trunk, it looks good to me and it doesn't introduces any bad behavior in the customizer. Marking this for commit.

#8 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 49949:

Accessibility: Customize: Add an empty alt attribute to the <img> tag used as a hidden placeholder in the Customizer preview when no logo is chosen.

Per accessibility best practices, it is recommended that all HTML <img> elements have an alt attribute. Any decorative images should have an empty alt attribute (alt="").

Props laxman-prajapati, sabernhardt, audrasjb.
Fixes #51846.

#9 @hellofromTonya
4 years ago

Scheduling this ticket for Testing Scrub, but need more information for the testers to QA it:

  • What are the steps to reproduce the problem?
  • Are there any testing dependencies such as a plugin or script?
  • What is the expected behavior after applying the patch?
Version 0, edited 4 years ago by hellofromTonya (next)

#10 @hellofromTonya
4 years ago

  • Keywords needs-testing-info added
Note: See TracTickets for help on using tickets.