What about simply giving the button a title of "close?" That would be accessible for screen readers and assistive tech right?
If you want to do it using an attribute, aria-label="Close" would be preferable to title, since title is inconsistently announced by screen readers. However, visually hidden text (the technique above) is more likely to be translated.
aria-label="Close"
title
Got it, thank you.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What about simply giving the button a title of "close?" That would be accessible for screen readers and assistive tech right?
If you want to do it using an attribute,
aria-label="Close"
would be preferable totitle
, since title is inconsistently announced by screen readers. However, visually hidden text (the technique above) is more likely to be translated.Got it, thank you.