[wp-trac] [WordPress Trac] #38768: Custom logo is missing meaningful alt attribute

WordPress Trac noreply at wordpress.org
Mon May 22 17:41:34 UTC 2017


#38768: Custom logo is missing meaningful alt attribute
---------------------------------------------+----------------------------
 Reporter:  sami.keijonen                    |       Owner:  sami.keijonen
     Type:  defect (bug)                     |      Status:  assigned
 Priority:  normal                           |   Milestone:  4.8
Component:  Themes                           |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch commit has-unit-tests  |     Focuses:  accessibility
---------------------------------------------+----------------------------
Changes (by flixos90):

 * keywords:  has-patch commit => has-patch commit has-unit-tests


Comment:

 [attachment:38768.6.diff] makes the new code in `get_custom_logo()` and
 its unit tests more precise, by only passing the `alt` attribute if it is
 the site name. This ensures the `trim( strip_tags( ... ) )` logic in
 `wp_get_attachment_image()` still fires correctly for the original alt
 attribute.

 Furthermore it adds a new unit test for a custom logo that has an alt text
 provided already, to provide better coverage.

 I added `commit` a bit early, but now I actually think it's ready. :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38768#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list