Skip to content

Instantly share code, notes, and snippets.

@stevefaulkner
Last active December 22, 2015 17:39
Show Gist options
  • Save stevefaulkner/6507474 to your computer and use it in GitHub Desktop.
Save stevefaulkner/6507474 to your computer and use it in GitHub Desktop.
using this http://tutorials.jenkov.com/svg/switch-element.html working switch example the following exposes the title or desc as the acc name.
<svg height="50" width="500" role="img" aria-labelledby="alt">
<switch>
<g systemLanguage="en-UK">
<text y="20" x="10">UK English</text>
</g>
<g systemLanguage="en">
<text y="20" x="10">English</text>
</g>
<title id="alt">alt text</title>
</switch>
</svg>
<!-- and -->
<svg height="50" width="500" role="img" aria-labelledby="alt">
<switch>
<g systemLanguage="en-UK">
<text y="20" x="10">UK English</text>
</g>
<g systemLanguage="en">
<text y="20" x="10">English</text>
</g>
<desc id="alt">alt text</desc>
</switch>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment