Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#49503 closed defect (bug) (duplicate)

the_custom_header_markup() + get_header_image_tag() incorrect alt text for images.

Reported by: ilovewpcom's profile ilovewpcom Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3.2
Component: Media Keywords:
Focuses: accessibility Cc:

Description

Hi,

In short, the core the_custom_header_markup() function relies on the core get_header_image_tag() to create the code for Header Images.

For some reason the get_header_image_tag() function has this code in it:

<?php
    $attr = wp_parse_args(
        $attr,
        array(
            'src'    => $header->url,
            'width'  => $width,
            'height' => $height,
            'alt'    => get_bloginfo( 'name' ),
        )
    );

This means that users can't manually specify their own alt text for header images, which is bad in multiple ways.

Could this be fixed in a future update?

Thank you.

Change History (2)

#1 @ilovewpcom
5 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #46124.

Looks like it is a duplicate of: https://core.trac.wordpress.org/ticket/46124

#2 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.