QuizNot attempted
aria-hidden vs .sr-only
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Icon:
aria-hidden="true"· Text: a.sr-onlyvisually-hidden class
aria-hidden="true"removes the icon from the accessibility tree while it stays visible, and.sr-only(clip + 1px box) hides text visually while keeping it readable.- Not the swapped pairing: that would announce the icon and hide the extra text from the people who need it.
- Not display: none for both: hides from everyone, so the 'opens in new tab' text is never read.
- Not role=presentation / alt='': those apply to images and semantics, and
alt=''on text does nothing.