Live data from Hacker News

Don't put aria-label on generic elements like divs

matuzo.at

61–70 of 92 posts

Re: Don't put aria-label on generic elements like divs

#61

So what's the correction solution for something like this, and what's the desired voiceover?

I 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.

Re: Don't put aria-label on generic elements like divs

#62
post #32

Earlier quoted context omitted.

How 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?!

For some reason I though the GP was talking about browsing on mobile, where I have the issue: https://imgbox.com/EiovsE5b https://imgbox.com/A4Fl9lE9

The same issue happens on desktop but it requires zooming a bit more than 110%, and is screen-size dependent.

Re: Don't put aria-label on generic elements like divs

#63
post #49

Earlier quoted context omitted.

> rather than directly interact with one that's specifically designed to accommodate them? Because a world where that happens consistently doesn't exist, it hasn't existed for the last 20 years we've been using ARIA tags, and won't ever exist.

Your advice to "avoid aria tags" would make that a self-fulfilling prophecy. The ways to make it happen: 1. A robust set of web primitives that are accessible by default, and 2. A government that will actually enforce laws (which already exist!) requiring websites to be accessible

> Your advice to "avoid aria tags" would make that a self-fulfilling prophecy.

As mentioned ARIA has had 20 years to succeed before my Hacker News post. ARIA will continue to fail with or without me.

Re: Don't put aria-label on generic elements like divs

#64
post #50
post #41

Earlier quoted context omitted.

> it really isn't that hard to get right. Yes you just need every website to use it, rather than fixing the client. Which is the 'boil the ocean' strategy mentioned in the comment you're replying to. > ARIA can help when devs want to use the wrong elements for some reason or for custom controls. But it can't. See this article.

See https://www.w3.org/WAI/ARIA/apg/patterns/ for a guide on how to create accessible markup for custom controls and the associated examples. See specifically https://www.w3.org/WAI/ARIA/apg/practices/names-and-descript... for details on naming. That has extensive notes and details for labeling elements correctly. See https://getbootstrap.com/docs/5.0/components/ for bootstrap markup on creating accessible components…

I didn't ask for resources on ARIA, are you replying to another comment?

Re: Don't put aria-label on generic elements like divs

#65
post #64
post #50

Earlier quoted context omitted.

See https://www.w3.org/WAI/ARIA/apg/patterns/ for a guide on how to create accessible markup for custom controls and the associated examples. See specifically https://www.w3.org/WAI/ARIA/apg/practices/names-and-descript... for details on naming. That has extensive notes and details for labeling elements correctly. See https://getbootstrap.com/docs/5.0/components/ for bootstrap markup on creating accessible components…

I didn't ask for resources on ARIA, are you replying to another comment?

You said "see this article" re: how aria-label is not applicable to div elements, hence the second link which is the WAI-ARIA guide on labelling elements.

You also said that ARIA can't help with custom controls in that post, which is where the other links are applicable as they describe doing just that. I.e. using ARIA tags to implement tabs, accordions, etc. either with or without a framework library.

Re: Don't put aria-label on generic elements like divs

#66
post #48
post #44

Earlier quoted context omitted.

> Respectfully screw making users rely on AI for accessibility. Why? It's the right tool for the job. > Just make the damn page accessible already. Oh so just modify every website and expect the disabled people to wait while this happens? This disabled web browser industry doesn't care about disabled people. Their solutions don't work, disabled browsers are expensive because government grants are given to purchase th…

For a user running into broken pages, sure, you have to compose with what you have. As a developer, however, get your shit fixed! And that fixing doesn't involve any MCP. Don't expect visitors to run AI...

> Don't expect visitors to run AI...

Why not? That's a more reasonable expectation than asking every website to change.

Re: Don't put aria-label on generic elements like divs

#67
post #65
post #64

Earlier quoted context omitted.

I didn't ask for resources on ARIA, are you replying to another comment?

You said "see this article" re: how aria-label is not applicable to div elements, hence the second link which is the WAI-ARIA guide on labelling elements. You also said that ARIA can't help with custom controls in that post, which is where the other links are applicable as they describe doing just that. I.e. using ARIA tags to implement tabs, accordions, etc. either with or without a framework library.

> You also said that ARIA can't help with custom controls in that post

I didn't write the post. The author believes in ARIA, I believe ARIA is fundamentally broken.

Re: Don't put aria-label on generic elements like divs

#68
post #42

Earlier quoted context omitted.

> What document? 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.

Clients can't automatically fix all existing web pages, because the semantic information just isn't there. AI doesn't excuse web developers. It wouldn't even be a fix. Who wants to wait for an AI agent for each interaction? Not all accessibility tools are expensive: - NVDA is free and open source - Narrator is included with windows - Voiceover is included with macOS and iOS - Orca is free and open source. - Talkback…

> Clients can't automatically fix all existing web pages, because the semantic information just isn't there

Yes it is. Webpages semantically provide information on the purpose of onscreen elements by their appearance. Vast quantities of humans ensure the semantic information is there by using the websites. Websites that do not convery semantic information through their appeareance will die, because nobody is using them.

> Not all accessibility tools are expensive

I want to acknowledge your point here - the situation may have improved the last time I looked at accessibility tools, which at the time was mainly overpriced badly maintained proprietary software. I still think the "boil the ocean" strategy is discredited and wrong.

Re: Don't put aria-label on generic elements like divs

#69
post #67
post #65

Earlier quoted context omitted.

You said "see this article" re: how aria-label is not applicable to div elements, hence the second link which is the WAI-ARIA guide on labelling elements. You also said that ARIA can't help with custom controls in that post, which is where the other links are applicable as they describe doing just that. I.e. using ARIA tags to implement tabs, accordions, etc. either with or without a framework library.

> You also said that ARIA can't help with custom controls in that post I didn't write the post. The author believes in ARIA, I believe ARIA is fundamentally broken.

post != article

From https://news.ycombinator.com/item?id=48281764:

> > ARIA can help when devs want to use the wrong elements for some reason or for custom controls.

> But it can't. See this article.

Re: Don't put aria-label on generic elements like divs

#70
post #69
post #67

Earlier quoted context omitted.

> You also said that ARIA can't help with custom controls in that post I didn't write the post. The author believes in ARIA, I believe ARIA is fundamentally broken.

post != article From https://news.ycombinator.com/item?id=48281764 : > > ARIA can help when devs want to use the wrong elements for some reason or for custom controls. > But it can't. See this article.

People post both articles and comments to HN. My comment pointed out that ARIA can't help with anything as ARIA is a boil the ocean approach.
Post reply on HN