Live data from Hacker News

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

matuzo.at

81–90 of 92 posts

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

#81

Earlier quoted context omitted.

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

In my experience, the reader mode works perfectly fine for sites like that (it worked for that one site I mentioned in my original comment as well) both in Chrome and Firefox.

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

#82
post #80
post #78

Earlier quoted context omitted.

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

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

> ... that I didn't make

Ok so you agree that the web has not and is unlikely to be ARIA compliant?

But then persist in supporting ARIA despite knowing that goal isn’t and never will be achievable?

That seems exactly like religion.

> you're wrong on this as other commenters told you

As does this. Nobody has refuted the point in the original post that ARIA is a boil the ocean strategy, in face you have just conceded it. What makes you think other commenters disagreeing would change that?

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

#83
post #82
post #80

Earlier quoted context omitted.

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

> > I feel that claiming the web now consistently complies with ARIA is an incredibly bold claim > ... that I didn't make Ok so you agree that the web has not and is unlikely to be ARIA compliant? But then persist in supporting ARIA despite knowing that goal isn’t and never will be achievable? That seems exactly like religion. > you're wrong on this as other commenters told you As does this. Nobody has refuted the po…

You agree that most programs are bug ridden. But then persist in writing programs despite knowing that goal isn't and never will be achievable?

There are imperfections in any piece of furniture and yet we are still building furniture? How religious!

You sound like this to me.

There's a whole world between "accessible HTML is never achieved anywhere" and "accessible HTML is fully achieved everywhere". As other commenters already told you, we are actually mostly there, there's no complete failure here. Sure, shit's not perfect (far from it, sadly...) but I feel like you are throwing the baby with the bath water.

I'm not willing to increase my electricity bill or spend tokens to make up for your unwillingness to use widely accepted - and mandated by law in many cases! - solutions. I'll just pass and probably others will do as well.

I'll stop here, this is not productive, none of us will likely move from where we stand. Let's just say that you are apparently alone in your position here in this discussion and you have so far failed to convince us. Call that position in which everyone here is except you "religion" all you want. I'll even snarkily risk a tu quoque by emphasizing that AI is no magic dust.

Good day.

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

#84
post #83
post #82

Earlier quoted context omitted.

> > I feel that claiming the web now consistently complies with ARIA is an incredibly bold claim > ... that I didn't make Ok so you agree that the web has not and is unlikely to be ARIA compliant? But then persist in supporting ARIA despite knowing that goal isn’t and never will be achievable? That seems exactly like religion. > you're wrong on this as other commenters told you As does this. Nobody has refuted the po…

You agree that most programs are bug ridden. But then persist in writing programs despite knowing that goal isn't and never will be achievable? There are imperfections in any piece of furniture and yet we are still building furniture? How religious! You sound like this to me. There's a whole world between "accessible HTML is never achieved anywhere" and "accessible HTML is fully achieved everywhere". As other comment…

> But then persist in writing programs despite knowing that goal isn't and never will be achievable?

Because, asides from users interacting with less programs than they do websites it’s not possible for a user to systematically fix all the programs they interact with. You are proposing an 0(n) solution instead of an 0(1) solution.

That should be incredibly obvious before this discussion even started, and even more obvious after reading this far in the thread. You’re replying but you’re not paying attention to what you’re reading. I’m not going to bother continue reading or interacting with you any further.

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

#85
post #6

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

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

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

#86

Ever 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?

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

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

#87
post #86

Ever 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?

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

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

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

#88
post #72

Earlier quoted context omitted.

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.

It's not a binary. most web sites are accessible to some degree. Just the fact that semantic elements exist at all makes a big difference. Popular frameworks have accessibility built in.

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

#89
post #70
post #69

Earlier quoted context omitted.

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.

ARIA is a solution to a specific problem, not something that should be used on every site. HTML is accessible out of the box when semantic elements are used as intended. If you are using a div as a button, you probably aren't hand writing HTML. It is likely part of a library. Adding the necessary ARIA attributes benefits every site using the library. Your boiling the ocean analogy implies that every web developer needs to scatter ARIA attributes all over their code, which just isn't true.

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

#90

Earlier quoted context omitted.

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

i think firefox shows the "open image in new tab" for backgrounds also, now. at least sometimes. still easily defeated by putting an invisible div above it so no right clicks reach it... or do some js bullshit to disable right clicks...
Post reply on HN