-
Notifications
You must be signed in to change notification settings - Fork 26
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
Clarification sought regarding exposing title attribute via description when also part of name calculation #148
Comments
The missing bit here is that the It does seem odd to me that the |
Hi @joanmarie this is tricky :-) Currently implementations in browsers are not interoperable, as in they are all over the place in regards to acc name calculation for examples (mostly edge cases) i added to https://thepaciellogroup.github.io/AT-browser-tests/test-files/input-button.html look at tests 5-10. I have not had time to record what i observed yet. @scottaohara is correct that it is odd that the label element is not taken into account in the acc name calculation for button, that is a bug. |
Well, the label element IS taken into account in the acc name calculation. The label element's content is:
@stevefaulkner and @scottaohara: What do you each think the expected title should be? |
The acc name should be “foo baz”. The label is provided by the text nodes of the label element, which is why the title shouldn’t be considered part of the acc name. |
@scottaohara that is what i get from testing in all except firefox. |
Indeed. And when I read what's in the AccName spec (general rule for descending children and concatenating strings for name-from-content) + what's in the HTML AAM (overrides the calculation for certain elements), "foo bar baz" is the expected result. If my reading is correct, we either need to fix the user agents (what I was planning to do) or AccName and/or HTML AAM. I'll write up the exact manual calculation steps here both as a sanity check and as for subsequent discussion. |
Oops. I think my read was incorrect due to AccName step D:
I guess we can close this. Sorry for the noise! |
Thank you for the discussion @joanmarie :) |
I'll keep this closed (or at least not reopen it, since it's your spec and issue tracker), but @stevefaulkner stated:
You want me to file a new issue for that? |
that's ok @joanmarie. i'll reopen this issue and assign to myself. thanks |
@scottaohara, regarding:
Should there be one space in between "foo" and "baz" or two? I just assumed one, and I do think most user agents tend to simplify/collapse whitespace. But a member of the ARIA Working Group pointed out the two spaces in the Thanks again for all your help with this one! |
I believe you're correct @joanmarie. I'll check some more and verify for you. |
So checking with @stevefaulkner as well as doing some quick manual testing, I couldn't find an instance of extra white space (beyond a single space) being reported in the accessible name of an element. Sometimes when looking directly at text nodes, there were instances where a single bit of white space was included in the accName if there was a line break in the source code. But the extra white space wasn't included in the accName of the element that made use of the text. so for example:
Reported as "Text 1 Text 2" And
Reported as "Test this" |
Noting this related issue (29). |
Given this test case:
<label for="test">foo <input id="test" type="button" name="test" title="bar"> baz</label>
The accessible name of the input should be "foo bar baz" based on what is in the AccName + HTML-AAM specs. The question is: Should "bar" be exposed as the accessible description?
The HTML-AAM states the following regarding accessible description calculation of
input type="button"
:The element lacks an
aria-describedby
attribute and avalue
attribute. It does have atitle
attribute. And while thetitle
attribute was used as part of the accessible name; it technically was NOT "used as the accessible name." Thus the accessible description seems like it should be "bar".Whether or not the accessible description should indeed be "bar" is something I will gladly leave to authors and those with similar expertise. As an implementor, I would find it helpful if the spec were more explicit, e.g. something in the ballpark of:
if my current, literal reading is the correct expectation. Otherwise, something in the ballpark of:
Thanks in advance!
The text was updated successfully, but these errors were encountered: