Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

inline SVG - best alternative to "alt" tag normally used for < img > SEO? [duplicate]

Say I were to swap out an <img> within my main site header to use SVG instead. Normally I would depend on the <img>'s alt tag.

Is the SVG <title> the best replacement method for "alt" with this type of changeover?

<svg role="img" aria-label="title + description here]">
  <title>[title here]</title>
  <desc>[long description here]</desc>
  ...
</svg>
like image 555
Joe Avatar asked Nov 13 '12 23:11

Joe


2 Answers

I have studied 508 quite a bit over the years. For the tiny bit of overhead it will cost you to create an alternative text attribute to the svg image, it really isn't worth skipping it. Keep in mind that all screen readers are different, and so are their users. SVG has a lot of capability to harness, but we aren't there yet. Yes, Google will index the text in your image, but if you care about non-sighted users being able to access your content across the board, you should throw in an alt tag. It is literally the bottom rung of accessibility features. There is no sense in letting the low hanging fruit rot on the vine.

like image 120
Kraken Avatar answered Sep 17 '22 15:09

Kraken


According to SVG Open, a <title> must be supported by screen reader of for example blind people, still there are workarounds already discussed on StackOverflow <-- HERE IS YOUR ANSWER, this topic might be a duplicate?

like image 25
Hrvoje Golcic Avatar answered Sep 17 '22 15:09

Hrvoje Golcic