Re: placeholder part of accessible name calculation?

On 20/07/2020 08:20, Marc Haunschild wrote:
> Hi,
> 
> Maybe I was looking at the wrong places, but I can’t find the answer to 
> my question mentioned in the subject of my mail.
> 
>   I’m testing a website with a form that has no label, but placeholder 
> instead.
> 
> I know that this does not meet success criterion 1.3.1.

1.3.1 is about making sure info and relationships that are visually 
apparent are also conveyed in the markup. So if there's no label, 
there's no relationship that needs to be conveyed...so I don't think 
this would have any impact on 1.3.1.

As Jan already mentioned, relying on placeholder alone does however fail 
3.3.2 as when the user starts to enter things into an input, or if 
there's already a value shown for the input, there is effectively no 
visible label or instruction.

As for whether or not placeholder counts as giving an accessible name to 
an element, I seem to remember that it falls under step D of the 
accessible name calculation 
https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_te

"[...] 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 as defined by the 
host language, unless the element is marked as presentational 
(role="presentation" or role="none")."

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 Monday, 20 July 2020 08:46:39 UTC