WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 weeks ago

Last modified 10 days ago

#51846 closed defect (bug) (fixed)

The "alt" attribute missing on the image tag

Reported by: Laxman Prajapati Owned by: 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 2 months ago.
Added "alt" attribute on the image tag.

Download all attachments as: .zip

Change History (11)

@Laxman Prajapati
2 months ago

Added "alt" attribute on the image tag.

#1 @Laxman Prajapati
2 months ago

  • Keywords has-patch added

#2 @johnbillion
2 months ago

  • Focuses accessibility added
  • Version trunk deleted

#3 @sabernhardt
2 months 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.


2 months ago

#5 @ryokuhi
2 months ago

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

#6 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.7

#7 @audrasjb
3 weeks 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
2 weeks 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
10 days ago

Please provide need more information for testers to manually test the patch (including at Test Scrubs):

  • What are the steps to reproduce the problem?
  • What are the steps to test?
  • Are there any testing dependencies such as a plugin or script?
  • What is the expected behavior after applying the patch?
Last edited 10 days ago by hellofromTonya (previous) (diff)

#10 @hellofromTonya
10 days ago

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