DEV Community

Discussion on: 4 CSS tricks that will get you dirty looks from other developers

Collapse
 
waterlink profile image
Alex Fedorov

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.

Collapse
 
ankitbeniwal profile image
Ankit Beniwal

Please don't hurt the web accessibility.

this is really annoying to people using screen readers

As she mentioned, it's bad for screen readers.

Collapse
 
waterlink profile image
Alex Fedorov

Hey, Ankit,

I understood the full paragraph differently:

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).

Please tell me if that makes sense.

Thread Thread
 
ankitbeniwal profile image
Ankit Beniwal • Edited

ohh alright. My bad. Thanks for making it clear.

Thread Thread
 
waterlink profile image
Alex Fedorov

No worries! Thank you for asking—accessibility is an important topic!