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

WordPress Trac noreply at wordpress.org
Mon May 22 20:20:39 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

Comment (by westonruter):

 Replying to [comment:27 afercia]:
 > However, this doesn't work well when updating and already existing
 custom logo in the customizer, i.e. press "chance logo", select the same
 image, update the alt attribute: the image get inserted with the previous
 alt attribute unchanged.

 This would be expected because the control only re-renders the image when
 the setting is changed. The setting just contains the attachment ID, so if
 you select the same image then there is no detected change, as the
 attachment props aren't being listened to for changes. One way to go about
 that would be to manually trigger a setting change event when the media
 library is closed after a selection has been made.

 But the problem is deeper than that actually: the media control doesn't
 ever print out values for the `alt` attributes. See

 So a couple things would need to change here, out of scope from improving
 the Custom Logo image's `alt` on the frontend.

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

More information about the wp-trac mailing list