DEV Community

Discussion on: Hiding Secret Links With CSS

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

I'm glad you found this cool I appreciate the idea, but that's awful, did you know that pseudo elements content is not read by screen readers across the board? and so this is discrimination against partially sighted developers and against quite a few employment laws depending on the country (this is also the answer you give to get the job).

Also it could have been achieved by just hiding a span within that text in an accessible way.

Collapse
 
nchlswhttkr profile image
Nicholas Whittaker

Yep, I don't think this is a good means of challenging potential applicants given it doesn't lend itself to users who depend on assistive tools. I wouldn't ship it.

It seems to me like the goal was to hide the link well away from the content itself (hence using an inlined stylesheet rather than a span inside/near the paragraph), which this achieves at the aforementioned cost.

I think it's an interesting use of CSS that's worth a quick investigation, even if it isn't useful in practice.

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

No worries, even bad things can have useful outcomes, somebody might find it useful. I like this one, the letter e can be submitted in html input of type number and e can be used in CSS like this border-radius: 9e9em. Oh the stuff we can do 😅

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

PPS, you mention the aria-label, here's a neat trick.

content: attr(aria-label);
Thread Thread
 
nchlswhttkr profile image
Nicholas Whittaker

TIL, neat! That's a great way of sharing the label's value!