Yet another AccName sanity check: Name from non-embedded input's value

Hey Bryan and others interested in AccName.

I'm still validating test cases as part of fixing implementation bugs
and found another instance where I think the current implementations are
correct (according to the algorithm) and our expectations (WG and
Bryan's tool) are wrong. The case in question is test case #558:

====
if given
  <input type="text" value="peanuts" id="test">
  <img aria-labelledby="test" src="foo.jpg"/>
then the accessible name of the element with id of "test" is "peanuts"
====

The image is labeled by the input. But the only thing exposed by the
input is the value attribute. So calculating the name from the input
beginning with step 2 (i.e. current node is the input), we get:

* 2A doesn't apply: The input is not hidden
* 2B doesn't apply: Calculating a name; the input lacks aria-labelledby
* 2C doesn't apply: Calculating a name; the input lacks aria-label
* 2D doesn't apply imho: I don't see value as an attribute that defines
  a text alternative. And when I look at the name calculation stuff in
  HTML AAM, it doesn't say value is such an attribute. See section
  5.1.1.
* 2E doesn't apply: The input is not embedded within the label *for
  another widget* (emphasis added). So while the input is referenced
  by aria-labelledby, I think that's trumped by the fact that what
  references it is an image rather than a widget.
* 2F doesn't apply: Input/textbox doesn't allow name from content.
* 2G doesn't apply: Input is not a text node.
* 2H doesn't apply: The input is not a descendant of an element whose
  name is being computed.
* 2I doesn't apply: The input lacks a tooltip attribute.
* 2J doesn't apply: Because there is no 2J. But I bet you didn't know
  that without looking at the spec because the algorithm is insanely
  long and you lost count some time ago. :)

End of options. Empty string. And that's what the implementations say
too. What say y'all?

Thanks in advance!
--joanie

Received on Monday, 19 March 2018 20:01:59 UTC