RE: Required input. HTML attribute and plain "required" text in label results in duplication for AT. Hide one?

Not ‘hidden’ text in the label, but visible text in the label as (presumably) screen reader users are not the only people who need to know the optionality of input … 

 

Also, there is a valid argument that forms don’t need every input marked with visible text or character given either sufficient instruction and/or for those used every day and supported by training. 

 

As I have said to Alan off-list, as a screen reader user, not enough attention is paid to things like repetition, wordsrunningtogether, worthless text alternatives, redundant content, text alternatives in generated content, names from content that also have text added etc. 

 

Listening to a screen reader all day – whether for prompting or for comprehension – and endless keystroking is exhausting so anything that can be done to improve the efficiency and minimise frustration is valuable … 

 

The fact that aria-hidden is being considered to overcome the limitations of user agent support for HTML attributes is problematic, don’t you think?

 

 

 

 

From: Guy Hickling <guy.hickling@gmail.com> 
Sent: Wednesday, August 31, 2022 7:20 AM
To: WAI Interest Group discussion list <w3c-wai-ig@w3.org>
Subject: Re: Required input. HTML attribute and plain "required" text in label results in duplication for AT. Hide one?

 

> but removing a valuable item of meta information that describes the input to machines (a secondary but important aim) feels like a different failure to fix the first 

 

That isn't a failure in itself, so long as the hidden text is announcing it, which it is. To see this, consider what AT does with the information from the required attribute - all it does is announce "required" to the user when they land on the field. There is no other, more mysterious effect on AT. So Adam is quite right, if you take away the HTML required attribute and leave the hidden text for screen readers in the label, it will always be announced with the label when the user lands on the field! The WCAG does not say how you should pass the info to AT by the attribute, only that you must do it some way.

 

Additionally, there is an actual problem with using the HTML required attribute. When keyboard users and AT users are just going through the form  to find out what's there, in discovery, they tab onto the field then onto the next one - and at that point browser validation in some browsers automatically shows an error message saying you must complete the field! Keyboard and screen reader users don't want that when they are only in discovery mode. It's annoying for them (much more than a repetition of "required"), and also a WCAG fail of 4.1.2 because it's reporting an error where none exits - the user hasn't started completing the form yet so how can there be errors? So if you were going to use the required attribute, use the ARIA one, aria-required, not the HTML one to avoid that.

 

Received on Wednesday, 31 August 2022 01:36:03 UTC