Closed tombrunet closed 1 year ago
Placeholder is explicitly mentioned in the [HTML AAM)(https://www.w3.org/TR/html-aam-1.0/#input-type-text-input-type-password-input-type-number-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-name-computation) (step 4).
It is indeed not recommended, but still working (and browsers are indeed doing it, so an input
field with a placeholder does have an accessible name and passes 4.1.2).
@Jym77 Thank you. I figured we hadn't just made that up, but we couldn't find any mention in the HTML, ARIA, or ARIA in HTML specs beyond the indication of the opposite.
We use an
input
with aplaceholder
attribute as a pass example for accessible name (see https://act-rules.github.io/rules/e086e5#passed-example-5)However, ARIA spec and Accessible Name and Description Computation 1.2 don't mention the placeholder as an accessible name. And, HTML explicitly says that this should not be done:
The only support we can find is that the browsers happen to do it (though MDN docs also say not to do it - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input )
I'm suggesting we simply remove this as a pass example.