Closed Scotchester closed 10 months ago
Hey @Scotchester,
Can you please confirm the version? That specific link isn't being flagged as an issue on my end. 😅 The latest version of Sa11y is 3.0.6 — the demo page you linked to should reflect that in the header too.
Hi @adamchaboryk, thanks for the quick reply!
On my site, I'm just using the bookmarklet. Inspecting the JS that that retrieves, it also looks like 3.0.6.
The demo also appears to correctly be loading 3.0.6.
Knowing that, I had a hunch, and it turns out that I'm only seeing this false positive in Firefox! It correctly reports nothing in Chrome and Safari. I wonder why Firefox behaves differently.
Firefox 121.0.1 on MacOS appears fine. Although... I am indeed getting this false positive on Firefox ESR. This is troubling.
I'll look into this tomorrow. Thanks for pointing this out - it's greatly appreciated!
I'll let you know once it is fixed.
Ah yes, another good callout. We have to use ESR, here (currently as 115.6.0esr). I would be surprised if ESR has an actual functional difference that persists across versions, but I could be wrong on that…. If this is fixed in later versions of Firefox, then I would assume you don't need to do anything else.
This isn't the first Firefox ESR issue i've encountered. But I've narrowed down the issue!
The ariaLabel property or element.ariaLabel
returns undefined in Firefox ESR.
@itmaybejj We'll have to update computeAriaLabel
and swap element.ariaLabel
with .getAttribute('aria-label')
Or something like this:
const ariaLabel = element.getAttribute('aria-label');
if (ariaLabel && ariaLabel.trim().length > 0) {
return ariaLabel;
}
return 'noAria';
I'll also try to file a bug report with FF.
Fascinating! And disheartening :(
I do note that on the MDN page you reference, it shows Firefox adding support for element.ariaLabel
in 119, which the next ESR release will incorporate, and it looks like that will drop around May, if past ESR major release timing holds going forward. Possibly not worth fixing in the interim?
It's an easy fix and a pretty serious false positive — I wouldn't want to rely on their timelines!! I'll have the issue patched today. Thanks again for the bug report!!
I think my next job is to figure out how to configure my unit testing with headless Firefox ESR!
Fixed in 3.0.7
Thanks so much!
Hi!
I'm trying to figure out why a link that only has an SVG icon for a child but does have an
aria-label
for a text alternative is being reported as an error.The markup:
And the error I'm getting:
You can also see the issue on the Sa11y demo's advanced links section. Before toggling the "Links (Advanced) [AAA]" switch on, the item labeled "ARIA Label" is already throwing this error, but there is no indication that this item is supposed to be erroring even without the switch on.
Shouldn't the
aria-label
be sufficient? I've not had any other automated tools report this as an issue.Thanks for any insight!