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

Glad to hear someone remains optimistic ☺

 

I’m not aware of any modern and common desktop screen reader browser combinations that won’t announce the HTML required attribute when navigated either by tabbing or using navigation quick keys, but there may be cursor modes or operating techniques for which it won’t be announced.

 

For example, using the form field list dialog in JAWS will not present this information until the field is actually focused. 

 

In this particular case, having ‘required’ in the accessible name for a field may be beneficial to some screen reader users.

 

It will also not be announced by screen reader applications that offer speech-on-hover and likely screen magnification applications that also use speech, but I don’t have one installed so can’t confirm whether it does or not. 

 

This may be another case for which having ‘required’ in the accessible name is beneficial.

 

Mobile is a whole other kettle of fish which I recommend you do some testing with?

 

Pretty broken, isn’t it?

 

 

From: Bristow, Alan <Alan.Bristow@elections.ca> 
Sent: Thursday, September 1, 2022 11:08 PM
To: Adam Cooper <cooperad@bigpond.com>; 'Guy Hickling' <guy.hickling@gmail.com>; '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?

 

That's me Adam (wildly optimistic) : )

 

Re:

> If the “required” isn’t a child of the label, then it won’t be announced when the field is focused because it is not programmatically associated with it …  only when using virtual cursor/browse mode below the field will it be announced.

 

Thank you. I have amended internal docs to emphasise what we already stated, that explicit (not implicit) association of label+input is needed. 

 

Our docs require users to use the text "required" as part of the label text, so that's visual users covered.

 

So as long as AT upon seeing an input with the 'required' attribute announces it as "required", then this seems like the right balance.

 

My only remaining worry is; are there any user-agent + AT combos that may fail to announce a "required" input as such? I am banking on this functionality being robust and ubiquitous.

​

Regards,

 

Alan

. . . . -   . . - - -

Alan Bristow ( he / him / il )

Web Developer / Développeur Web

Elections Canada / Élections Canada

 <mailto:alan.bristow@elections.ca> alan.bristow@elections.ca

+1 873-416-1175

  _____  

From: Adam Cooper <cooperad@bigpond.com <mailto:cooperad@bigpond.com> >
Sent: Wednesday, August 31, 2022 8:41 PM
To: Bristow, Alan; 'Guy Hickling'; 'WAI Interest Group discussion list'
Subject: RE: Required input. HTML attribute and plain "required" text in label results in duplication for AT. Hide one? 

 

Ce message a été envoyé par un expéditeur externe. Veuillez faire preuve de prudence et ne pas cliquer sur les liens ou ouvrir les pièces jointes à moins de reconnaître l'expéditeur et de savoir que le contenu est sûr.

 

This message was sent from an external sender. Please exercise caution and do not click links or open attachments unless you recognize the sender and know the content is safe.

 

 

Wildly optimistic, Alan … I guess the best you can do is create an attribute selector for :required  that does something like add ‘required’ to a span when the HTML attribute is present using ::before or ::after …  at least that means there is a visual indicator (inputs don’t accept pseudo elements). 

 

If the “required” isn’t a child of the label, then it won’t be announced when the field is focused because it is not programmatically associated with it …  only when using virtual cursor/browse mode below the field will it be announced.

 

With regards to anomalies in  announcements for screen reader users such as repetition or running together, if these issues were visible, then they’d be treated as functional defects and likely resolved, and so it should be for screen reader users.

 

That there is an argument about whether such issues are failures of WCAG is irrelevant 

 

 

 

 

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

 

Thank you Adam, Guy, Marc and Patrick.

 

On balance I am sure now that I should use the aria-hidden to avoid the repetition. But clearly advances in AT will, in time, tackle this more holistically and remove the need for such a workaround (I hope I am not  being overly optimistic there).

 

It was especially helpful indeed to hear, Adam, that a measure such as this is actually valuable.

 

Regards,

 

Alan

. . . . -   . . - - -

Alan Bristow ( he / him / il )

Web Developer / Développeur Web

Elections Canada / Élections Canada

 <mailto:alan.bristow@elections.ca> alan.bristow@elections.ca

​ 

  _____  

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

 

Ce message a été envoyé par un expéditeur externe. Veuillez faire preuve de prudence et ne pas cliquer sur les liens ou ouvrir les pièces jointes à moins de reconnaître l'expéditeur et de savoir que le contenu est sûr.

 

This message was sent from an external sender. Please exercise caution and do not click links or open attachments unless you recognize the sender and know the content is safe.

 

 

BTW, when I said "hidden" text, that was a mistake of course. The "required" in the label element isn't hidden, as Adam pointed out - thanks! I was concentrating too much on the attribute and not enough on the label. A case of the left typing fingers not knowing what the right ones were doing!

 

 

Received on Friday, 2 September 2022 00:17:43 UTC