[wp-trac] [WordPress Trac] #55768: Checkboxes not displayed when images are turned off in browser

WordPress Trac noreply at wordpress.org
Wed May 18 20:15:14 UTC 2022


#55768: Checkboxes not displayed when images are turned off in browser
----------------------------+-----------------------------
 Reporter:  martiniwebb     |       Owner:  (none)
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  Administration  |     Version:  5.3
 Severity:  normal          |  Resolution:
 Keywords:  needs-patch     |     Focuses:  ui, css
----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * version:   => 5.3


Comment:

 Looks like this CSS rule doesn't work as expected with images turned off:
 {{{
 input[type="checkbox"]:checked::before {
         /* Use the "Yes" SVG Dashicon */
         content:
 url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%233582c4%27%2F%3E%3C%2Fsvg%3E");
         margin: -0.1875rem 0 0 -0.25rem;
         height: 1.3125rem;
         width: 1.3125rem;
 }
 }}}

 Introduced in [46248] / #47498, reverting that changeset seems to fix the
 issue in my testing. Setting the version accordingly.

 Since it's not an `<img>` HTML tag, an `alt` attribute would probably not
 be applicable here. I think some other way to implement what [46248] aimed
 to achieve could be explored.

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


More information about the wp-trac mailing list