jargon

Frontend & browser·Accessibility and semantics

you hid the decorative icon from screen readers while leaving it perfectly visible on screen.

aria-hidden

An attribute removing an element and its entire subtree from the accessibility tree while leaving it rendered. It is correct for decoration that duplicates adjacent text, and dangerous everywhere else: putting it on anything focusable produces a control a keyboard can reach and a screen reader cannot describe. It is not a way to hide things visually and it does not stop focus, which is what `inert` is for.

Commonly confused with