Skip to content

svgTitles

Reports <svg> elements without a <title> child element.

✅ This rule is included in the jsx logical and logicalStrict presets.

SVG elements should include a <title> child element to provide accessible descriptions for screen readers. Without a title, users who rely on assistive technologies cannot understand the purpose or content of the SVG.

The <title> element provides descriptive text that screen readers can announce. Alternatively, you can use aria-label or aria-labelledby attributes for accessibility.

This is required for WCAG 1.1.1 compliance.

<
any
svg
/>
<
any
svg
viewBox: string
viewBox
="0 0 100 100" />
<
any
svg
>
<
any
circle
cx: string
cx
="50"
cy: string
cy
="50"
r: string
r
="40" />
</
any
svg
>
<
any
svg
>
<
any
desc
>Description only</
any
desc
>
</
any
svg
>

If you’re using a framework that automatically injects appropriate titles for SVG elements, you can disable this rule.

Made with ❤️‍🔥 around the world by the Flint team and contributors.