WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Placeholder and Accessible Name Computation

for

From: Jonathan Avila
Date: May 8, 2019 1:34PM


I am generally opposed to the placeholder being used as the accessible name because I believe it will lead to the sole use of it as an accepted way of providing a name rather than a fallback. The placeholder should not act as a label and should act as a hint. By including it in the name it encourages it's acceptance as a label rather than a placeholder. It's called placeholder for a reason and not a label.

Would we accept the src of an image as fallback content for the alternative text of an image if no alt text was provided? What about the name attribute of an iFrame if no title or aria-label was provided?

Jonathan

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Detlev Fischer
Sent: Wednesday, May 8, 2019 3:29 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Placeholder and Accessible Name Computation

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


I seemed to remember placeholder has been included in the native HTML input name calc https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element <https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-url-and-textarea-element> which @stevefaulkner has just confirmed - while the doc Accessible Name and Description Computation 1.2 https://w3c.github.io/accname/ <https://w3c.github.io/accname/> doesn't list it. So I am not sure why these sources are out of sync and which one should be considered authoritative...

> Am 08.05.2019 um 20:16 schrieb Steve Green < <EMAIL REMOVED> >:
>
> Chrome's browser developer tools contain an Accessibility tab that calculates the accessible name. That can be very helpful when testing convoluted code you didn't write yourself, but the computation appears to contain an error insofar as it uses the "placeholder" attribute.
>
> Bryan Garaventa's tool https://whatsock.github.io/w3c-alternative-text-computation/Editable%20Live%20Input%20AccName%20Test.html does not use the "placeholder" attribute, and since he was an author of the Accessible Name and Description Computation 1.1 I am inclined to trust his implementation rather than Chrome's.
>
> It seems that the computation rules are ambiguous when they say "Otherwise, if the current node's native markup provides an attribute (e.g. title) or element (e.g. HTML label) that defines a text alternative, return that alternative in the form of a flat string". Chrome is interpreting the "placeholder" attribute as a text alternative but Bryan's tool isn't.
>
> Any thoughts on this?
>
> Regards,
> Steve Green
> Managing Director
> Test Partners Ltd
> 020 3002 4176 (direct)
> 0800 612 2780 (switchboard)
> 07957 246 276 (mobile)
> 020 7692 5517 (fax)
> Skype: testpartners
> <EMAIL REMOVED>
> www.testpartners.co.uk
>
> Connect to me on LinkedIn - http://uk.linkedin.com/in/stevegreen2
>
> > > archives at http://webaim.org/discussion/archives
>