Alt text for pseudo-elements

Note

Message thread

Matthias Zöchling wrote on

This one slipped under my radar: Providing alt text for pseudo-elements works in all browsers, eventually there’ll be no more need for a fallback:

a::after {
	/* content: "↗"; 👋 */
	content: "↗" / " (opens in new tab)";
}

Safari caught up in early 2024, and Firefox not long after.

In July 2024 we first saw green lights across the board on caniuse.com. — Screenshot from caniuse.com

Get involved

Have your say on Mastodon, or simply share this thread.