3 ms·
This is basically what was happening late 90s and early 2000s, except with the div. ARIA didn't exist at the time so this presented a major accessibility issue.
by zamalek 3y ago
This is basically what was happening late 90s and early 2000s, except with the div. ARIA didn't exist at the time so this presented a major accessibility issue. We now have ARIA, but the "use the right element" cargo cult persists [there's nothing wrong with this cargo cult - it just fits the definition, CSSing it up is just as functional sans older and possibly text browsers].
Edit: it's also where table got a bad rap (for a while table wasn't even used for tables, it was completely taboo). Using table for layout completely wrecked accessibility.
- resonious 3y agoI still see a lot of fresh React/Vue code that is all divs with onclick handlers.
- CSSer 3y agoI don’t think it fits the definition of a cargo cult. It’s about convenience. I can use a <header /> and the screen reader announces it as such. I could do that with ARIA, but why put in the extra effort? To use a more gross example, I could make a div into a text input or even a form with contenteditable, a bunch of CSS I’d otherwise get out of the box, and a lot of JS. Yet it would require much more work. The only thing I’ll grant you is that my first example’s benefit is a marginal difference, but there is a benefit nonetheless. It was also probably pushed as much for the screen reader benefit as it was for the ability to parse and extract information if I’m feeling cynical, but I digress.