Visuals / SVG Simple

ClickUp Ticket


WCAG Description of Component

The HTML Accessibility API Mappings specify that the <svg> element has an implicit role of graphics-document. However browser support for the graphics-document role and the SVG Accessibility API Mappings is inconsistent.

This rule is limited to the explicit use of roles, as a clear indication that content should convey meaning, until the SVG Accessibility API Mappings is more stable and browser support is more consistent.

Browser and assistive technology support for SVG <title> and <desc> elements is currently inconsistent. Using WAI ARIA in combination with the img role for non-decorative <svg> elements significantly improves accessibility browser support.

Until browser support for the SVG Accessibility API Mappings is more consistent it is recommended to explicitly remove decorative <svg> elements from the accessibility tree.

Reference link

Recommended to take ~15m and review this article in full.


Functional Description


How to use this component


Component Example

Simple SVG Source twitter

Code Snippets

HTML

                
<svg role="img" aria-labelledby="uniqueTitleID" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2335.5 1240.7">
    <title id="uniqueTitleID">The title of the svg</title>
    [... svg inside code]
</svg>
            

History Tracking

  1. Code orginally created by Kelly; Approved by Steen on Nov 20,2023