8 ms·
Don't put aria-label on generic elements like divs
- injidup 4mo agoThe irony of a tool designed to enforce usability and discoverability that which itself is unusable and undiscoverable.
- jrochkind1 4mo agotoday i learned there are browser built-in popovers now.
- karlshea 4mo agoThose have been there for a bit, what is more recent is CSS anchor positioning which lets you position the popover near the item that triggered it. It’s all finally very nice!
- paulryanrogers 4mo agoZoom bug reading this article. Perhaps it's just my Firefox? Still, a nice concise read if you can get it
- goda90 4mo agoLeft part of the page is cut off and only accessible with reader mode on IronFox for Android. Talk about #WebAccessibilityFails
- Xirdus 4mo agoSpeaking of WebAccessibilityFails, the article overflows to the left without a scrollbar when viewed on a phone narrower than an iPhone, making the first word of every line unreadable (and there are a lot of lines on a phone narrower than an iPhone).
- jnovek 4mo agoI keep my browser zoomed in substantially to compensate for uncorrectable vision issues. I’d say perhaps once per day I’ll encounter a website that has never had zoom in/out (ctl +/-) tested because if you zoom up even one level from 100%, everything breaks. There are several equally useless failure modes I’ve seen with this, a few off the top of my head: - rendering fails, everything falls apart - some elements disappear - it drops into the feature-limited mobile view - the author or framework overrides zoom with some other behavior — this one makes me especially crazy because they had to do *extra work* to screw up accessibility Certain websites are impossible for me to use and I just avoid them.
- pbalau 4mo ago> I’d say perhaps once per day I’ll encounter a website that has never had zoom in/out (ctl +/-) tested because if you zoom up even one level from 100%, everything breaks Just tested, hn breaks if you zoom >110%.
- oneeyedpigeon 4mo agoHow does it break for you? Seems OK to me on android — in fact, I already had it at 110%. Reminded me to check my desktop settings which have HN fixed at 125%. I cannot believe that, in 2026, the default font size is set at 12px — is anyone actually reading it at that size?!
- ryandrake 4mo ago> I cannot believe that, in 2026, the default font size is set at 12px — is anyone actually reading it at that size?! 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.
- voidUpdate 4mo agoI leave HN on default everything, but I have a 1080p monitor so it might look bigger for me than someone with a higher resolution monitor... I don't know how that works. But I often have to zoom out of websites linked here because the text is so big and it feels uncomfortable to read
- uallo 4mo agoThis is caused by using CSS grid with "minmax(auto, 57rem)" and an overflowing table. It can be fixed with adding "safe" to "justify-content: safe center" that is defined on main. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/justify-content#safe https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P...
- ryandrake 4mo agoFunny how the problem itself is created by CSS, and the solution is "more CSS." On the other hand, bare HTML tends to be extremely accessible and lacks these kinds of basic problems with panning, zooming, and scrolling.
- bobthepanda 4mo agoCSS is this weird thing where it has dominance as a layout engine because it is so battle tested compared to a lot of other layout engines, but was clearly designed by a committee that could give a rat’s ass about how ergonomic it is to use. It took until 2023 to support nesting, something that was so obvious that preprocessors have had it since at least 2006.
- xigoi 4mo agoBare HTML is pretty bad for accessibility. For example, you get no maximum width, making websites painful to read in a wide window.
- mostlysimilar 4mo agoWindows are resizable. Built-in width selection!
- xigoi 4mo agoYou can’t set a different size per site. More width is better for sites that have sidebars and stuff.
- kid64 4mo agoThe most infuriating case I've seen within the last few days is the Airbnb CAPTCHA, which relies on the user being able to see content that is blocked at zoom levels over 100%. They have an alternative audio option that they've clearly never tested; it always reports failure, even if the CAPTCHA was solved correctly. Unthinkable for an organization with their resources.
- 542458 4mo agoWhile 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”. Even 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!
- karlshea 4mo agoThis is spot on. They are ripe for getting entirely wiped out by AI, and good riddance tbh. My personal gripe is their refusal to support restarting heading levels within sections, causing whole classes of problems with CMS templating.
- jugglinmike 4mo agoARIA-AT is a W3C Community Group (of which I'm a member) trying to address this problem: https://aria-at.w3.org/about https://aria-at.w3.org/about
- zero_shift 4mo agoWhy would they want to improve their tools? In many cases (Vispero), they're the ones selling accessibility consultancy
- extra88 4mo agoI don't know what accessibility tools you're thinking of. If you mean assistive technology software like screen readers and voice control, yes, too often they fail to do what they should even when web standards are followed but at least as often the fault is with the web browsers (assuming the page code is all technically correct). I'm not aware of any accessibility reasons to not simply use a <dialog> element for dialogs. For it to be a modal dialog, it must be opened using the `.showModal()` method or the invoker command `command="show-modal"`. The hack of needing to implement roving tabindex techniques is not due to the failings of accessibility tools but because of web standards have not yet provided an alternative (adding the `focusgroup` attribute to the HTML standard is in the works).
- nailer 4mo agoAvoid 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. Support efforts for computer vision based browsers, MCP and APIs.
- ramblurr 4mo agoWhat document? Do you have any sources to back these claims up?
- nailer 4mo ago> What document? https://news.ycombinator.com/item?id=48237159 https://news.ycombinator.com/item?id=48237159 > Do you have any sources to back these claims up? Yes, asides from the article, check the prices of browsers from the disability industry and consider for yourself whether it's logically easier to fix every website or make a client that can adapt existing webpages.
- rhdunn 4mo agoNVDA is a free screen reader for Windows (written by blind devs) that works with Firefox and Chrome. You don't need to pay for a specialist browser as all web browsers (Firefox, Chrome, Edge, Safari, etc.) will implement the native accessibility model of the operating system they are running on (IAccessible/MSAA for Windows, etc.). In Firefox you can press the right mouse button and select "Inspect Accessibility Properties" or select the "Accessibility" tab from the developer window and it will show the accessibility tree (roles, states, properties, etc.) just like the DOM tree in the "Inspect" tab. That is what the browser is displaying to screen readers and other accessibility software and uses the behaviour of the HTML elements along with the ARIA roles/states/properties defined by the webpage to construct that tree. Thus, it will display an ol/ul as a `role=list` unless overridden to be e.g. a `tablist` by the website. See https://www.w3.org/TR/wai-aria-implementation/ https://www.w3.org/TR/wai-aria-implementation/ for a specification on how browsers should implement HTML and ARIA to different operating system accessibility APIs.
- recursivedoubts 4mo agoNo 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. I think the accessibility consultants like this state of affairs: they can threaten more lawsuits and extract more in consulting fees.
- nostats 4mo agoIs 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. It's way way simpler than, say, var hoisting in JavaScript.
- bryanrasmussen 4mo agoit's a somewhat stupid rule. People process information differently visually than they do via aural methods. If you have a reason why something should not be read by a screen reader, because say the order you would be reading it makes sense visually but not at all aurally, then you have to jump through hoops to visually hide the aural content, and then aria-hide the visual content, and there may be more complicated things dependent on button position etc. Not be able to aria-label anything and have the screen reader say ok I take that in priority seems badly thought out. Also - screenreaders could have a setting to read aria-label on divs and then read the content if the user wanted it. If the user determined the labels on divs were inadequate, they would flip this setting, if they decided this seems to be working well they would just go with what the site does.
- micromacrofoot 4mo agoIt's not really arcane, a div is meaningless because it's simply a container. If you want it to have meaning you can't just add a label. If I put the word "button" on a rock, it doesn't make it a button. That's the same story here.
- zero_shift 4mo ago> I think the accessibility consultants like this state of affairs: they can threaten more lawsuits and extract more in consulting fees. I think there is truth in this. A lot of the assistive technology (AT) vendors, also sell consultancy. Go to the Vispero career pages (who develop JAWS for Windows) and a big chunk of the jobs are remote consultancy roles advising clients on accessibility errors and selling for billable hours. What makes a web page accessible? Why, it has to work with JAWS, of course! Vispero makes a lot of money from this; the consultants are all in India, the clients are all in the West, so they can hoover up the difference. I get the impression most AT vendors are extremely cheap, which may explain why it takes decades for them to improve things
- chrismorgan 4mo agoTwo days ago, in https://news.ycombinator.com/item?id=48248285 https://news.ycombinator.com/item?id=48248285 I commented on exactly this thing, a <dl aria-label=…> (dl has “no corresponding role”).
- htx80nerd 4mo ago[flagged]
- micromacrofoot 4mo agoit's fine as long as you add an appropriate role
- DocTomoe 4mo agoEver since the EU has started to mandate web accessibility compliance - without defining what exactly needs to be done to be compliant, the only safe, lawyer-resistant way is to put aria-labels on absolutely everything. It sucks, and arguably has the opposite effect, but this came from the same people who thought cookie banners were a good solution to anything, so ... what did we expect?
- extra88 4mo agoThey have defined what exactly needs to be done to be compliant, it's basically "meet WCAG 2.1 Level AA" with some additions. WCAG has already been the de facto standard for decades.
- DocTomoe 4mo agoI assume you have not read Directive 2016/2102 and/or EN 301 549, because your approach is nice and so very, very, very suable. The issue is not accessibility itself. I'm all for making things simpler. The issue is that the EU framework combines broad principles, partial technical references, vague proportionality requirements, and evolving judicial interpretation. In practice, that means the exact compliance boundary is often only defined by a judge during litigation, and with the website operator funding the clarification process through lawyer and court fees. That is precisely the kind of legal environment that creates serial-litigation ecosystems like the ADA lawsuit industry in the US. With systems becoming increasingly more complex, testing all potential code paths increases effort exponentially. With content being user-generated, not necessarily system-generated, you now technically need an editorial watchdog position that greenlights every change (if only to prevent Sally from Sales to post a meme in copy without a proper alt text, or worse, an infographic, without a wall of text describing the infographic in great detail). And for the attacker, they only need to find one case of violation - while you need to be correct 100% of the time. The only two ways to migitate such issues are 1. do not offer the service in Europe at all and actively prevent EUians from acessing any part of them - which becomes increasingly attractive (disclaimer: I am an EUian, unfortunately), 2. implement defensive overcompliance far beyond practical usability requirements, or 3. accept ongoing legal uncertainty and budget for it accordingly. Unfortunately, "just build reasonable software and trust common sense" is not a stable legal strategy anymore.
- pimlottc 4mo agoSo what's the correction solution for something like this, and what's the desired voiceover?
- wldcordeiro 4mo agoI was wondering that too. They explained the differences between the tools but didn't really qualify which was doing things "right" just that they differed.