Re: Placeholder attribute an accessible name?

On 19/10/2022 19:42, John Foliot wrote:

> I was curious about that: the HTML 5 spec is quite clear, and the ARIA 
> spec around accessible name calculation is non-specific about that 
> particular attribute (the calculation is less clear than it used to be, 
> when it specifically listed the attributes in the recursive loop - but I 
> still don't see @placeholder mentioned anywhere). I do understand 
> however that screen readers are doing this calculation out of necessity, 
> but is it standard behavior, or more just due to precedent?

I believe in the accessible name calculation algorithm, this falls under

E. Otherwise, if the current node's native markup provides an attribute 
(e.g. alt) or element (e.g. HTML label or SVG title) that defines a text 
alternative, return that alternative in the form of a flat string as 
defined by the host language, unless the element is marked as 
presentational (role="presentation" or role="none").

where placeholder is "an attribute ... that defines a text alternative".

It also seems that currently browsers don't fully agree yet on whether 
or not placeholder should be exposed as an accName of last resort (from 
memory, Chrome and Webkit do expose it, while Firefox doesn't).

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 19 October 2022 18:54:01 UTC