WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 8 months ago

Last modified 8 months 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 10 months ago.
Added "alt" attribute on the image tag.

Download all attachments as: .zip

Change History (11)

@Laxman Prajapati
10 months ago

Added "alt" attribute on the image tag.

#1 @Laxman Prajapati
10 months ago

  • Keywords has-patch added

#2 @johnbillion
10 months ago

  • Focuses accessibility added
  • Version trunk deleted

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


10 months ago

#5 @ryokuhi
10 months ago

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

#6 @SergeyBiryukov
10 months ago

  • Milestone changed from Awaiting Review to 5.7

#7 @audrasjb
8 months 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
8 months 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
8 months 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 8 months ago by hellofromTonya (previous) (diff)

#10 @hellofromTonya
8 months ago

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