-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
2.4.6 - Does this only apply to undescriptive accNames derived from the label? #2372
Comments
Hi Andrew, This SC isn't focused on the markup, as the understanding doc says:
It is more a case of: If you have a visible heading or label, does it describe the topic / purpose? So in your examples, if it is visible and "is not descriptive", then it fails. If it is the accname only and is not descriptive, then that probably fails 1.3.1 or 4.1.2. 1: fail, 2: not applicable, 3: fail, 4: NA but probably does fail 2.5.3, 5: NA but probably fails 1.3.1/4.1.2. |
x-ref #2134 - the gnarly edges where the "labels are for everybody, and we don't mean accname" part of 2.4.6, and the "4.1.2. says there needs to be an accname, not whether or not it's good/bad/descriptive enough" discussion, collide. |
As argued in #2134 : For us continentals, the typical cases is all the x elements with aria-label="close" (should be "schliessen" or similar in a German site) or the umpteen menu elements labelled "togglemenu" So where is the issue? Is there a name? Yes. Is it descriptive? No. That's why I lean towards including such cases in 2.4.6 (and stick lack of state and role into 4.1.2). |
3.1.2 Language of Parts ... ducks |
@patrickhlauke not sure if you are serious - but if you are, I'd have thought 3.1.2 applies to marking up language correctly whatever language you use (which may be difficult for aria attributes, not sure whether they inherit the language of the element they sit on)... |
it was half-joking, but it would currently fail that point already (even more so if it's something that's not even technically feasible) (let's not mention Hawaiian diacritics though...) |
I guess you could apply On the more general point, I don't think there's an issue where there is a visible (and descriptive) label and the accname is descriptive. (If they are different that could fail label-in-name, but that's a different matter.) Where there is no visible text label, I guess you could squint hard and apply the SC to the accname? Where there is an icon as the visible label, I'd look at the alt-text to be equivalent. Was that roughly the result of the other thread or am I off base? |
A control that relies on a text alternative can be failed under 1.1.1, but, if we add in Also, hello @alastc !
Perhaps not 4.1.2, as the accuracy or descriptiveness of accNames is not covered. I'll take 1.3.1! |
as the |
But as @patrickhlauke refers to above, the Understanding doc for 2.4.6 clearly distinguishes between a label and an accessible name:
And sure, 4.1.2 is perhaps not ideal (given its focus on the presence, not accuracy of accNames) but as the intent of 4.1.2 is to "gather information about, activate (or set) and keep up to date on the status of user interface controls in the content", could you not argue that a non-descriptive accName prevents that? |
but then what if a control has a visible label that is also the accName, and it's non-descriptive. Do you then want to fail both 2.4.6 and 4.1.2? Or do you then let 4.1.2 pass? That's one of the problems... |
to me, the more sustainable solution would be to look again at 2.4.6 and specifically that note that separates "label for everybody vs. accessible name". Seems this has had some unintended consequences of having borked accNames fall between the cracks. |
Yeah, why not? You'd have a non-descriptive label and a non-descriptive accName. |
because then in the normative requirement, as well as the non-normative understanding, for 4.1.2 you'd have to start integrating all the rationale for what is and isn't "descriptive", mirroring 2.4.6 into it effectively. fun times... |
For sure, tweak that. But the SC concerns labels, which are different from names. |
https://www.w3.org/TR/WCAG21/#dfn-labels
for an AT user, that's the accName. it's only because of the first note in the definition that we're prevented from making a "descriptive enough or not?" judgement when the accName 1) differs from the visible label; 2) is incorrect |
So what are you suggesting? Make labels and names synonymous? Redefine them? That note (and the corresponding note under name) serve to distinguish the two. |
Of course can't brutally change the definition, as that would then affect other SCs (especially nonsensical for 2.5.3 Label in Name). Which is why this is non-trivial (but nonetheless easier than trying to cram the concept of "sufficiently descriptive" normatively into 4.1.2 Name, Role, Value) |
The only outstanding thing with 2.4.6 is its definition of a "Label":
Which relies on the definition of "Text":
And then the definition of "Programmatically determined":
I can't see how 2.4.6 doesn't apply to programmatically determined text even if it is invisible. |
@anevins12 but the first note in the definition https://www.w3.org/TR/WCAG21/#dfn-labels makes the point that label is presented to all users, so just the accname is not a label. and the definition of label is also referenced from 2.5.4 Label in Name https://www.w3.org/TR/WCAG21/#label-in-name (so it's not just "2.4.6's definition of Label"). and you'd end up with a weirdly circular SC if you now said that accname (on its own) also counts as a label, as then "Label in Name" would always pass... though oddly by the same logic, if the visible label and the accname diverge (i.e. fail 2.5.4), you could also argue based on that first note in the definition that there is no label since there's nothing that's presented to all users (since they're being presented with different things)... though AT users would in some cases still be able to "get" to the visible label unless it was being completely overridden by something like anyway, that's the tangled web we weave... still pondering a slight tweak of 4.1.2 perhaps...qualifying the "needs to have an accessible name" bit to perhaps not introduce the whole concept of "descriptiveness" there (as that would be too much), but some concept of "correct/appropriate" (though that's wooly in its own right as well) |
Hello!
Does 2.4.6 Headings and Labels only apply to accessible names when the name is derived from the visible label or heading? For some examples, I'll list scenarios where I think 2.4.6 is and is not applicable. Are any of these scenarios incorrect?
Applicable to 2.4.6
aria-labelledby
. The label of the heading, however, is not descriptive.aria-labelledby
. The paragraph is descriptive in context, but the accessible name of the dialog is not descriptive.<button>
is named by its visible contents, but the contents are not descriptive.Not applicable to 2.4.6
<button>
control contains a descriptive and visible label as its contents, but is named undescriptive viaaria-label
. Going slightly further with 2.5.3, the undescriptive name does, however, contain a word from the visible label.aria-label
. The accessible name is not descriptive.The text was updated successfully, but these errors were encountered: