In short
An inline <svg role="img"> tells assistive technology "this is an image," so it needs a name, just like an <img> needs alt text. Add aria-label or a <title> as the first child. If the SVG is decorative, use aria-hidden="true" and drop role="img". This is a best-practice check outside Google's weighted scoring table.
<svg role="img" aria-label="5-star rating">...</svg>
<svg aria-hidden="true" focusable="false">...</svg> <!-- decorative -->
This guide isn't affiliated with or endorsed by Google.
Related issues
Sources and references
Chrome for Developers, Lighthouse accessibility score
MDN, ARIA: img role

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



