Make WordPress Core

Changeset 54739

Timestamp:
11/01/2022 11:03:35 AM (21 months ago)
Author:
audrasjb
Message:

Administration: Remove role="img" from decorative SVG images.

This changeset removes role="img" attribute from two decorative images: despite being hidden to assistive technologies using aria-hidden="true", automated tools still understand them as images and expect alternative texts.

Props viralsampat, sabernhardt, audrasjb, ryokuhi, elifvish.
Fixes #56824.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r54638 r54739  
    19451945        <div class="health-check-widget-title-section site-health-progress-wrapper loading hide-if-no-js">
    19461946            <div class="site-health-progress">
    1947                 <svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
     1947                <svg aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
    19481948                    <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
    19491949                    <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
  • trunk/src/wp-admin/site-health.php

    r53950 r54739  
    119119    <div class="health-check-title-section site-health-progress-wrapper loading hide-if-no-js">
    120120        <div class="site-health-progress">
    121             <svg role="img" aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
     121            <svg aria-hidden="true" focusable="false" width="100%" height="100%" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
    122122                <circle r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
    123123                <circle id="bar" r="90" cx="100" cy="100" fill="transparent" stroke-dasharray="565.48" stroke-dashoffset="0"></circle>
Note: See TracChangeset for help on using the changeset viewer.