lemoynelibrary / lemoyne

Files used in setting up new web design in LibGuides v2 and elsewhere
5 stars 1 forks source link

Fix Accessibility Labeling of SVG Logos #55

Open tomkeays opened 4 years ago

tomkeays commented 4 years ago

Problem and remediation described here: https://www.youtube.com/watch?v=ahYBjo0_rxw

The nutshell of the problem is:

Here's the summary of the remediation that needs to be done:

<a href="https://resources.library.lemoyne.edu/library" aria-label="Noreen Reale Falcone Library">
  <svg id="falcone-svg-logo" viewBox="0 0 446 69" class="lmc-svg-banner-logo" 
       role="img" aria-labelledby="falcone-logo-title falcone-logo-desc" aria-hidden="true">
    <title id="falcone-logo-title">Noreen Reale Falcone Library</title>
    <desc id="falcone-logo-desc">Logotype of Noreen Reale Falcone Library</desc>
    <g>...</g>
  </svg>
</a>

Note also, the various paths inside the <g> element of the SVG, which define the individual letters of the logotype, lack aria-label attributes. Since the parent SVG is hidden, does this matter? If not, what's the best way to label them: aria-label or aria-labelledby?

Secondly, it turns out that the individual letters are not in proper sequence. I'll probably go ahead and reorder them, but does it actually matter?