Re:Inlining SVGs for Dark Mode
by extra88 on Thursday April 06, 2023 @11:34PM
(#35477733)
Yes, for inline SVGs, putting its text alternative in its <title> element is well-supported. See Pattern #5 in this excellent article [0] by Carie Fisher.
That's a separate issue from ensuring an inline SVG is still visible regardless of a site's dark or light mode or visible when a user uses their device's Contrast theme (aka `forced-color`).
That's a separate issue from ensuring an inline SVG is still visible regardless of a site's dark or light mode or visible when a user uses their device's Contrast theme (aka `forced-color`).
[0] https://www.smashingmagazine.com/2021/05/accessible-svg-patt...