Missing title and desc elements after svgo optimization
0 reputation · 04 Jan 2024, 13:17 UTC
When optimizing SVG files with svgo, the default configuration enables the removeTitle and removeDesc plugins, which strip <title> and <desc> elements from the output. This behavior can inadvertently remove accessibility information that assistive technologies rely on.
The project has discussed whether the defaults should be changed to preserve these elements, but no consensus has been reached. Users must currently disable the plugins manually via CLI flags or a configuration file, which adds overhead and may lead to inconsistent accessibility preservation across workflows.
Should svgo change its default behavior to retain <title> and <desc> elements? What would be the typical file‑size impact of keeping these elements in optimized SVGs? Are there configuration patterns that provide a reliable middle ground between accessibility and optimization without requiring per‑project overrides?