Don't put aria-label on generic elements like divs
36 points by cyanbane 4 days ago | 20 comments
injidup 2 hours ago
The irony of a tool designed to enforce usability and discoverability that which itself is unusable and undiscoverable.
replychrismorgan 46 minutes ago
Two days ago, in https://news.ycombinator.com/item?id=48248285 I commented on exactly this thing, a <dl aria-label=…> (dl has “no corresponding role”).
reply542458 3 hours ago
While web accessibility is important and something we should be investing in, I do feel that the vendors of accessibility tools are somewhat to blame here in how friggin difficult it is to actually make something accessible. Quirks and features are wildly inconsistent across tools, and feature uptake is much slower than it should be. For example, creating an accessible dialog shouldn’t be a multi-page essay to explain, it should just be “use the <dialog> element.” - but the a11y tools are so inconsistent that you can’t just do the standards compliant thing. And don’t get me started on roving tabindex techniques (for things like data tables), which are at best an ugly hack that the entire industry has collectively decided “eh, it’s good enough”.
replyEven what's described in the article basically boils down to "You can label things, but not generic things (for some reason?), unless that generic thing is a <section> or has a popover attr in which case it magically works." And this isn't even one of the "hard" accessibility things!
goda90 3 hours ago
Left part of the page is cut off and only accessible with reader mode on IronFox for Android. Talk about #WebAccessibilityFails
replyrecursivedoubts 2 hours ago
No one has done more damage to web accessibility than the web accessibility industry. Arcane rules like this make any sane developer throw up their hands in disgust.
replyI think the accessibility consultants like this state of affairs: they can threaten more lawsuits and extract more in consulting fees.
nostats 11 minutes ago
Is this an arcane rule? "Don't label divs" and "aria-label is for when there's no content in the DOM that can be read" are pretty simple rules. Labels are ways to tell a screen reader about content it can't read, like an image or icon. Pretty straightforward.
replyIt's way way simpler than, say, var hoisting in JavaScript.
paulryanrogers 3 hours ago
Zoom bug reading this article. Perhaps it's just my Firefox?
replyStill, a nice concise read if you can get it
nailer 2 hours ago
Avoid aria tags. The spec is unworkable (see this document) the browsers made by the disability industry extract vast quantities of money from disabled people with little effectiveness because they try and boil the ocean which unsurprisingly is ineffective.
replySupport efforts for computer vision based browsers, MCP and APIs.
There are several equally useless failure modes I’ve seen with this, a few off the top of my head:
Certain websites are impossible for me to use and I just avoid them.Just tested, hn breaks if you zoom >110%.
The very first "quality of life" thing I do when I install a new computer / operating system nowadays is double (sometimes triple) the default font size. 12pt was probably fine when our monitors were 640x480, and when we were 18 years old.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...