SVG
Scalable Vector Graphics, an XML-based image format that describes shapes with coordinates so it stays sharp at any size.
In more detail
Icons are usually inline SVG elements. Decorative icons inside a labelled button should have aria-hidden="true" so screen readers do not try to read the graphic.
Example
In the browser: SVG stands for Scalable Vector Graphics. An inline SVG icon inside a button is part of the DOM, so a click on the icon has the icon's path as event.target, which is why delegation uses closest().Related terms
- aria-hidden — An ARIA attribute that removes an element and everything inside it from the accessibility tree, while leaving it visible and clickable.
- XML — A text format that stores structured data as nested elements marked with tags in angle brackets, readable by both people and programs.
- aria-label — An ARIA attribute that gives an element its accessible name directly as a text string.
- event.target — The event property holding the element where the event actually started, such as the icon inside a button that was clicked.
- Element.closest() — The DOM method that starts at an element and walks up through its ancestors, returning the first one, itself included, that matches a selector.
- PNG — Portable Network Graphics: a lossless image format that supports transparency.
- Satori — An open-source Vercel library that converts HTML and CSS written as JSX into an SVG image.
Taught in
- WAI-ARIA Semantics: Roles, States & Accessible Name Computation — Design Systems & Component Engineering
- Event Delegation: Memory-Efficient Interaction Handlers — Frontend Architecture & Web Platform
- Loading UI: Instant Loading States with loading.tsx — Next.js 15 & Modern App Router Architecture