[wp-trac] [WordPress Trac] #49503: the_custom_header_markup() + get_header_image_tag() incorrect alt text for images.

WordPress Trac noreply at wordpress.org
Mon Feb 24 15:41:14 UTC 2020


#49503: the_custom_header_markup() + get_header_image_tag() incorrect alt text for
images.
---------------------------+-----------------------------
 Reporter:  ilovewpcom     |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Media          |    Version:  5.3.2
 Severity:  normal         |   Keywords:
  Focuses:  accessibility  |
---------------------------+-----------------------------
 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
 <?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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49503>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list