New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How is the text alternative for a label element determined? #78
Comments
One question. Why only Chrome, instead of Chrome and IE, since I’m reading that as Chrome and IE 11 do it correctly, since “span1 span2” was also valid per step D?
I don’t agree with Firefox’s computed label here.
|
only one of both variants can be correct. I suspect Chrome, because I suspect that for label not only the text content should be used, but the text alternative, which results recursively from all descendant elements |
I understand. Thanks for that. I completely blanked for a second and was just in a world where of course IE does that because of when it was last updated so it’s obvious that the answer of “alb al” is correct, but that it makes sense why IE says what it does.
At any rate, the Chrome calculated label is definitely the right one in my opinion.
|
Hi, In this case, the WhatSock computation is wrong and I need to fix that. Chrome is correct being "alb al". I'll add this to my todo list for tomorrow to fix. :) |
|
I see your point. We're going to have to talk that one out in our next meeting. |
Hi, since the sound quality was horrible, I'll write out what I meant to ask during the call. Specifically, it would be helpful to get feedback from @aleventhal, @cookiecrook, and @joanmarie about this topic, since it does impact the way the algorithm works as documented. At present, AccName does not consider an explicit label, such as with matching for and id attributes, to function in the same manner as an aria-labelledby id reference iteration. This means that a label may also include 1 or more aria-labelledby references within it, as long as they are not chained together. So, the first question is, should this be allowed, when the functional behavior of a label works in the exact same manner as though it were being referenced origionally using aria-labelledby from the root node (input element)? If no, it will change the AccName algorithm as it currently stands, because it will need to account for implicit labels such as when the label element wraps a form field, and also when role=label is used for the same purpose on supported ARIA widgets in the future. Please let me know your thoughts. Thanks, |
The other thing to consider (and potentially note in the spec) is that the computed AccName is not always what the screen reader user will hear, even if the user agent exposes it correctly to the API. The screen reader itself can present something different. Sometimes this is on purpose, and more often it's a bug or oversight, but it does happen. There may be some overlap here with the work @mcking65 and @zcorpan are attempting with ARIA-AT. Step 1: Is accessibility info making it to the API as expected? Step 2: Is the info being adequately conveyed to the user? |
@accdc I edited your comment to loop in the others mentioned, but can you clarify your pronouns? There are a number of references to "this" and "it" that make it difficult to understand exactly what you are asking. |
Thanks, yes indeed. To clarify, should the desired behavior, when processing the label element for a form field, function in the exact same manner as an aria-labelledby id reference if applied to the same element? If yes, both of these examples should produce the same accessible name of "Label", and not "Label Content".
And
According to the AccName algorithm, the process for root node must only have one id ref traversal. So, should these be treated differently, or the same? |
It's true that screen readers may report something different, but what I'm trying to determine is what user agents need to do under the hood for the accessibility tree, and to get agreement on this. This will be important for ensuring interoperability going forward. |
What is the name of the input?
I suspect that "alb al" is correct, so only Chrome does it correctly.
On the other hand, if we want aria-label to be allowed to be used within a label element, but not aria-labelledby, an appropriate exception should be inserted in step 2.B (then the output of Firefox would be correct): "and the current node is not already part of an aria-labelledby or label traversal"
The text was updated successfully, but these errors were encountered: