- From: Joseph Scheuhammer <clown@alum.mit.edu>
- Date: Mon, 30 Jan 2017 11:02:18 -0500
- To: James Craig <jcraig@apple.com>, Bryan Garaventa <bryan.garaventa@ssbbartgroup.com>
- Cc: Dominic Mazzoni <dmazzoni@google.com>, Alice Boxhall <aboxhall@google.com>, Marco Zehe <marco.zehe@gmail.com>, Alexander Surkov <asurkov@mozilla.com>, david bolter <david.bolter@gmail.com>, Accessible Rich Internet Applications Working Group <public-aria@w3.org>
Hi James, The relevant condition in rule 2C regarding aria-label is (my emphasis) , "if the current node has a *non-empty* aria-label attribute ...". Clearly aria-label="" (empty string) is not non-empty. Hence, the rule doesn't apply, and the process moves to the next step. What's less clear is whether a value consisting only of whitespace characters is "non-empty". My intuition is that counts as empty since, by itself, it's meaningless as a label. That invites the question of whether there is any case where an author needs a whitespace-only aria-label attribute? Sadly, I came up with one, although it's an edge case and there are easier ways to achieve the same goal. In the following, the value of aria-label is a single space character: <span role="button" id="bar" aria-labelledby="foo bar baz" aria-label=" "></span> <span id="foo">first</span> <span id="baz">second</span> On the assumption that an attribute value consisting of just a space character is non-empty, the name calculation concatenate "first", SPACE, and "second" to give the result: "first second" -- there is a space character between "first" and "second". But, the same result is achieved by not using aria-label at all, or by setting aria-label="first second" and not using aria-labelledby at all. I'm inclined to say an aria-label attribute value that consists of nothing by white space is "empty". Given that, rule 2C could be clarified as: "... if the current node has an aria-label attribute whose value is not the empty string and does not consist only of white space ..." On 2017-01-29 11:05 AM, James Craig wrote: > Firefox’s behavior is correct. @aria-label yields a white space string, which is then trimmed to an empty string, and the calculation continues to the element contents. > > I don’t think the name computation needs to be updated. These are just bugs in IE11 and Chrome. > > Joseph, do you agree? > > Bryan, will you file bugs in the Chromium and IE bug trackers? Does Edge have the same bug? > > PS. If you can reproduce the same bug in iOS or macOS, will you please file a bug the WebKit tracker, too? http://webkit.org/new-ax-bug Thanks! > > >> On Jan 27, 2017, at 2:40 PM, Bryan Garaventa <bryan.garaventa@ssbbartgroup.com> wrote: >> >> Hi, >> I've recently been updating my naming calculation tests, and the following is not consistent so I wanted to ask what is the expected behavior. >> >> Markup: >> >> <a href="#" aria-label=" ">test</a> >> >> In IE11 and Chrome, the accessible name is " ", which is nonsensical. >> >> In Firefox however the name is "test" which does make sense. >> >> So which is technically valid and how should browsers be doing this correctly? >> >> Thanks, >> Bryan >> >> >> >> Bryan Garaventa >> Accessibility Fellow >> SSB BART Group, Inc. >> bryan.garaventa@ssbbartgroup.com >> 415.624.2709 (o) >> www.SSBBartGroup.com >> >> -- ;;;;joseph. 'Die Wahrheit ist Irgendwo da Draußen. Wieder.' - C. Carter -
Received on Monday, 30 January 2017 16:17:55 UTC