Open jaragunde opened 2 years ago
Interesting that with the second example the input gets its name. Not necessarily opposed to that, but seems an error correction since <label>
would generally be an element that is prohibited by author naming via aria attributes.
i do see value in having a hidden <label>
to name a form control. but i don't think that's 'expected' to work right now?
i do see value in having a hidden
Not expected to work (certainly not implemented), but UAs may already be hiding the label next to the control by default, to prevent double-speech of the label + the control. We certainly do that in Chromium in the most basic cases (checkboxes and text controls, IIRC). Screen readers do their fair share of correction, too.
That was an aside, anyway... In your opinion, that piece of text refers exactly to this, a hidden label being used to name a control?
I believe <label>
should just be the inverse of aria-labelledby. It should work the same way. If the root is hidden, the name is still computed for the related control.
Related issue to make this clear in HTML AAM has been made. will try to get a PR done asap
This is the relevant piece of text I would like to discuss, in step 2A:
While we have discussed a lot about the meaning on the clause referencing aria-labelledby/describedby in #57, I don't really understand what the other part means, about "directly referenced by a native host language text alternative element". I can think of this example:
In the example above, all main user agents produce an empty accessible name, so they wouldn't be following the spec text, or the text might not refer to this case.
A more convoluted example:
This produces the accname "foo!" for the input in Chrome and WebKit, and empty in Firefox. But I'm not sure that the "directly referenced by a native host language text alternative element" text is meant to address this case, I see it more as a combination of steps 2B and 2E working together.
I would appreciate any thoughts on this. Thanks!