Re: non-landmark forms

On 02/08/2017 14:56, Taliesin Smith wrote:
> Hi Léonie,
> 
> So just to be clear so that I understand, too.
> In Tobias’s case using the form element without an explicit 
> aria-labelledby attribute, or without an explicit aria form role 
> attribute, would keep the form as a non-landmark form?

Almost!

The only way to create a form landmark is to use role="form". So <form 
role="form">, <div role="form">, or (if you're using SVG) <g 
role="form">, will all create form landmarks.

Using the <form> element on its own does not create a landmark, and 
neither will a <form> element with an accessible name. So <form 
aria-label="this form"> or <form aria-labelledby="that"> will not create 
landmarks either.


It is worth mentioning that using <form aria-label="This form"> or <form 
aria-labellledby="that"> will not give the form an accessible name either.

So for Tobias' use case, the <form> element on its own is the right 
solution, unless there is a good reason for giving each form on the page 
an accessible name in order to tell them apart.

If that is the case, then the only solution is to use the form role, 
then aria-label or aria-labelledby to provide the accessible name. This 
will turn every form into a landmark though, which may well turn out to 
be more hinderance than help to screen reader users!

The code would be something like <form role="form" aria-label="This form">.

Bear in mind that the ARIA design patterns are not talking about 
situations where implicit element semantics apply. When it talks about a 
form landmark, it assumes you are using role="form" to explicitly set 
the role using ARIA. The advice to provide accessible names is therefore 
also based on the assumption the form role will have been explicitly set.


HTH

-- 
@LeonieWatson @tink@toot.cafe tink.uk Carpe diem

Received on Wednesday, 2 August 2017 17:27:05 UTC