DEV Community

Discussion on: I was shocked 😱 that placeholder text on an <input> (instead of a <label>) might TECHNICALLY PASS WCAG⁉ Do you agree?

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
grahamthedev profile image
GrahamTheDev • Edited

No and I would hope it wouldn't!

But that isn't the point of the article.

For example what rule are the accessibility validators and testers citing when it says it fails? I can almost guarantee they point to one of the 6 Success Criterion I mentioned.

It is more of a thought experiment / critique than something you should actually be doing! (and I really I hope I made that clear otherwise I am adding to the problem instead of just writing an interesting (to me) article🤣 )

It can't be that difficult to write "an <input> should always have a correctly associated <label> or at the very least make use of WAI-ARIA to label the input. For example using either aria-label or aria-labelledby would be sufficient even if a visible and native <label> is strongly encouraged and preferred."