Some developers would add an anchor link around the entire list item, this is really annoying to people using screen readers. It's also annoying to style, because you'd have to set the text-transform and color property to overwrite standard link behaviour on all text.
This paragraph means to me that the alternative to ::before solution is to wrap the entire content in a <a> tag. And this <a> method is bad for accessibility and screen readers.
The ::before method is actually suitable for accessibility (neutral, doesn’t affect it).
Thank you for the article! It's right on time as I will need to use 2 point today to extend clickable area of the button to the whole parent element.
Please don't hurt the web accessibility.
As she mentioned, it's bad for screen readers.
Hey, Ankit,
I understood the full paragraph differently:
This paragraph means to me that the alternative to
::before
solution is to wrap the entire content in a<a>
tag. And this<a>
method is bad for accessibility and screen readers.The
::before
method is actually suitable for accessibility (neutral, doesn’t affect it).Please tell me if that makes sense.
ohh alright. My bad. Thanks for making it clear.
No worries! Thank you for asking—accessibility is an important topic!