[wp-trac] [WordPress Trac] #46124: Allow setting custom image alt text in custom header image

WordPress Trac noreply at wordpress.org
Fri Nov 26 08:48:54 UTC 2021


#46124: Allow setting custom image alt text in custom header image
-------------------------------------------------+-------------------------
 Reporter:  webmandesign                         |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.9
Component:  Media                                |     Version:  5.0.3
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch has-         |     Focuses:
  testing-info                                   |  accessibility
-------------------------------------------------+-------------------------
Changes (by sabernhardt):

 * keywords:  needs-testing has-patch needs-testing-info => needs-testing
     has-patch has-testing-info


Comment:

 == Testing

 1. **Before applying patch,** activate Twenty Seventeen or another theme
 that uses either `the_custom_header_markup` or `get_custom_header_markup`.
 2. Go to Appearance -> Customize and then Header Media (or directly to
 Appearance -> Header).
 3. Select the "Randomize suggested headers" option and click Publish.
 4. Visit the site and either inspect the image element or view the full
 page source. Verify that the header image has the site title in the `alt`
 attribute.
 5. Return to the Customizer and click the "Add new image" button.
 6. Upload a new image and set special alternative text.
 7. Click the "Select and crop" button, then click either "Crop image" or
 "Skip cropping" to set the header image, and click Publish.
 8. Visit the site and verify that the header image again has the site
 title in the `alt` attribute ''instead of'' the text you assigned.
 9. **Apply the patch.**
 10. Go to the Header Media section of the Customizer.
 11. Select the "Randomize suggested headers" option and click Publish.
 12. Visit the site and verify that the random header image now has an
 empty `alt=""` attribute.
 13. Return to the Customizer and click the "Add new image" button.
 14. Select the same image you uploaded earlier and click Publish.
 15. Visit the site and verify that the header image now has the `alt` text
 you assigned to it.
 16. Return to the Customizer, upload a new image, and set different
 alternative text.
 17. Visit the site and verify that this header image has the different
 `alt` text you assigned.
 18. (Try any other scenario you might find.)

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


More information about the wp-trac mailing list