Live data from Hacker News

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

matuzo.at

71–80 of 92 posts

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

#71
post #68

Earlier quoted context omitted.

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 th…

I'm glad that a large proportion of web developers are happy to boil the ocean then. I use the web every day with a screen reader. It works. 99% of what I want to access is fine. Often not perfect, but a whole lot better than what I could get out of AI.

I do use ChatGPT to research things, but I don't usually see that as accessibility solution. I completely agree that screen readers and browsers would benefit from AI, as they already are; Chrome and Edge can generate missing image descriptions. AI can certainly enhance accessibility, but it can't replace the existing technology that already works quite well a lot of the time.

The other positive about AI for accessibility is that the frontier models have a good understanding of what works. Instead of learning all the guidelines, you can just ask an agent to review the page for accessibility and fix any problems.

I realise I am only looking at it from a screen reader point of view, and yes, we are quite a small minority. But good universal design helps everyone, whether they just need to zoom the page for comfort without it breaking, their eyes are not that of a young person, they have dexterity issues using a mouse, and many more. Accessibility in general isn't serving a tiny minority,. I imagine most of us will come to appreciate it in some way.

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

#72
post #68

Earlier quoted context omitted.

> 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 th…

I'm glad that a large proportion of web developers are happy to boil the ocean then. I use the web every day with a screen reader. It works. 99% of what I want to access is fine. Often not perfect, but a whole lot better than what I could get out of AI. I do use ChatGPT to research things, but I don't usually see that as accessibility solution. I completely agree that screen readers and browsers would benefit from AI…

> I'm glad that a large proportion of web developers are happy to boil the ocean then.

That’s not how that expression works. The ocean is every website. An individual developer cannot modify every website.

More to the point, most websites are not accessible, will not validate, and this will never be the case.

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

#73
post #66
post #48

Earlier quoted context omitted.

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.

Because ethical issues aside, that's expensive to run, unreliable, non-deterministic hot mess that doesn't have predictable behavior. And predictable behavior is somewhat key.

I won't blame a disabled user seeking AI-based tools to browse the web to survive with what they have, but I will totally blame the devs who created the situation.

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

#74
post #63

Earlier quoted context omitted.

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.

As you mentioned, without proof. Sorry, but I think you have it completely backward.

ARIA attributes are only one of the tools to help with web page accessibility and are somewhat last resort when you can't do what you aim to do with bare HTML.

The first tool is to not break stuff in the first place.

The solution to "accessibility is not ideal across the world" is certainly not "Outright avoid tagging stuff for accessibility anyway", as if using ARIA attributes were somewhat harmful. It's not, unless you misuse them, and no, the spec isn't unworkable, and you also don't have to use it all.

The response to "software is broken" is not "software has had 50+ years to be bug free, let's put the burden on the users to deal with it since obviously developers can't do bug free".

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

#75

Earlier quoted context omitted.

The modern version is to use @media to achieve the same annoying effect without js. Fortunately, there's a finite number of rules so I've found that if you zoom far enough the text does actually start getting larger. Though I expect that someone's already figured out how to use CSS Math to keep text tiny at all zoom levels.

>The modern version is to use @media to achieve the same annoying effect without js. I think that is the up until about 2020 way, the modern way is using clamp to do it https://css-tricks.com/linearly-scale-font-size-with-css-cla...

Six years is getting long in the tooth. Isn't it about time to upend everything once again and invent another cascading wheel that trades old, familiar edge cases for new, unfamiliar edge cases?

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

#76

Earlier quoted context omitted.

>The modern version is to use @media to achieve the same annoying effect without js. I think that is the up until about 2020 way, the modern way is using clamp to do it https://css-tricks.com/linearly-scale-font-size-with-css-cla...

Six years is getting long in the tooth. Isn't it about time to upend everything once again and invent another cascading wheel that trades old, familiar edge cases for new, unfamiliar edge cases?

clamp is superior to @media because it solves a common problem with @media, although I am more apt to consider that problem in relation to proportions of divs and margins given the needs of responsiveness.

Indeed I'm not sure what edge case I might expect to find given the ability of using clamp in conjunction with @media.

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

#77

Earlier quoted context omitted.

I remember seeing a website that had for the top-level element, and had JS that would dynamically recalculate that percentage on every resize event to keep the visual font size almost (exactly) constant. Made me think for a moment that my mouse wheel broke.

One of my pet peeves in the modern web is when someone displays an image and scales it to exactly the size of your screen, but I want to look more closely at a part of the image so I do a scrollwheel zoom, only for the image to actually shrink as every UI element except the thing I want gets bigger. And then you go "ok, right click on the image and do the "Open Image in new tab" thing and somehow the site defeats tha…

I figure there must be an extension to handle these problems, I googled and the AI gave me a bunch of helpful answers, which all happened to be Chrome extensions despite me using FF. hmmm. It did also say it could help me find FF extensions if I really wanted them, but there seems to be some shenanigans going on here.

Anyway, an extension should solve it.

A propos image tricks sites pull, I've noticed before the right click for images don't work at all in Instagram web, I wonder how they do that, probably background on a div.

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

#78
post #74
post #63

Earlier quoted context omitted.

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

As you mentioned, without proof. Sorry, but I think you have it completely backward. ARIA attributes are only one of the tools to help with web page accessibility and are somewhat last resort when you can't do what you aim to do with bare HTML. The first tool is to not break stuff in the first place. The solution to "accessibility is not ideal across the world" is certainly not "Outright avoid tagging stuff for acces…

> As you mentioned, without proof.

I feel that claiming the web now consistently complies with ARIA is an incredibly bold claim, and the burden of proof is on you but you can test the top 50 websites yourself if you genuinely believe that.

> are somewhat last resort when you can't do what you aim to do with bare HTML

This thinking was popular 20 years ago when ARIA was created. Application-like behaviour, which nearly always means JS, is the majority of websites.

> ARIA attributes were somewhat harmful

Wasted engineering effort on minimally effective outcomes is harmful.

> "software has had 50+ years to be bug free, let's put the burden on the users to deal with it since obviously developers can't do bug free".

Others not following your religion is not a defect.

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

#79
post #73
post #66

Earlier quoted context omitted.

> Don't expect visitors to run AI... Why not? That's a more reasonable expectation than asking every website to change.

Because ethical issues aside, that's expensive to run, unreliable, non-deterministic hot mess that doesn't have predictable behavior. And predictable behavior is somewhat key. I won't blame a disabled user seeking AI-based tools to browse the web to survive with what they have, but I will totally blame the devs who created the situation.

A user interpreting visual meaning is vastly more reliable than expecting all the websites the user interacts with to be ARIA compliant.

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

#80
post #78
post #74

Earlier quoted context omitted.

As you mentioned, without proof. Sorry, but I think you have it completely backward. ARIA attributes are only one of the tools to help with web page accessibility and are somewhat last resort when you can't do what you aim to do with bare HTML. The first tool is to not break stuff in the first place. The solution to "accessibility is not ideal across the world" is certainly not "Outright avoid tagging stuff for acces…

> As you mentioned, without proof. I feel that claiming the web now consistently complies with ARIA is an incredibly bold claim, and the burden of proof is on you but you can test the top 50 websites yourself if you genuinely believe that. > are somewhat last resort when you can't do what you aim to do with bare HTML This thinking was popular 20 years ago when ARIA was created. Application-like behaviour, which nearl…

> I feel that claiming the web now consistently complies with ARIA is an incredibly bold claim

... that I didn't make

> This thinking was popular 20 years ago when ARIA was created. Application-like behaviour, which nearly always means JS, is the majority of websites.

That's besides the point, your JS code still generates HTML. Writing applications in JS doesn't change anything about the topic.

What I'm saying is that you mostly don't need to use aria attributes with a good HTML structure, generated from JS or not. Use them sparingly when you can do it in pure HTML (again, generated or not).

> Others not following your religion is not a defect.

That's not an answer to the stuff you quoted and there's no religion here.

You have a point about web accessibility lacking but we'll have to disagree about "let's just give up good practice since it's not been perfect despite all these years". Actually, you are not claiming "not perfect", you are claiming "not present", but you're wrong on this as other commenters told you.

Post reply on HN