WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: html 5 required

for

Number of posts in this thread: 6 (In chronological order)

From: Tomlins Diane
Date: Mon, Nov 06 2017 3:16PM
Subject: html 5 required
No previous message | Next message →

This just came up for us, and we just switched 70+ code files to use the html 5 "required' attribute. Now we find in testing, using NVDA 2017.3 with Firefox, NVDA announces empty fields as "invalid entry" the first time the user focuses on them, even before the error checking that takes place when a user hits the Submit button. So I would think this would make things confusing for AT users.

We tried adding aria-required="true" but that didn't help since we still have the "required" attribute in there too.

If I understand the replies to this thread, the "required' attribute is still a patchwork of support between browsers and AT??

Our developers won't be thrilled to back-pedal to take out the attribute they just put in :-/

Any possible workaround besides going back?

Thanks!

Diane R Tomlins
HCA IT&S | Digital Media
Accessibility SME


From: Lucy Greco
Date: Mon, Nov 06 2017 3:23PM
Subject: Re: html 5 required
← Previous message | Next message →

hi the required should not be adding that are they indacating the type of
data that should be entered i.e. email or phone number that should be the
only way it is saying that. some thing else is giving you that feed back

Lucia Greco
Web Accessibility Evangelist
IST - Architecture, Platforms, and Integration
University of California, Berkeley
(510) 289-6008 skype: lucia1-greco
http://webaccess.berkeley.edu
Follow me on twitter @accessaces


On Mon, Nov 6, 2017 at 2:16 PM, Tomlins Diane <
= EMAIL ADDRESS REMOVED = > wrote:

>
> This just came up for us, and we just switched 70+ code files to use the
> html 5 "required' attribute. Now we find in testing, using NVDA 2017.3 with
> Firefox, NVDA announces empty fields as "invalid entry" the first time the
> user focuses on them, even before the error checking that takes place when
> a user hits the Submit button. So I would think this would make things
> confusing for AT users.
>
> We tried adding aria-required="true" but that didn't help since we still
> have the "required" attribute in there too.
>
> If I understand the replies to this thread, the "required' attribute is
> still a patchwork of support between browsers and AT??
>
> Our developers won't be thrilled to back-pedal to take out the attribute
> they just put in :-/
>
> Any possible workaround besides going back?
>
> Thanks!
>
> Diane R Tomlins
> HCA IT&S | Digital Media
> Accessibility SME
>
>
>

From: Bim Egan
Date: Mon, Nov 06 2017 3:36PM
Subject: Re: html 5 required
← Previous message | Next message →

Hi Diane,

Screen reader users are getting used to it. Usually only happens in Firefox
though. It's up to newer versions of AT and browsers to get their heads
together and find the fix. Don't be tempted to a hack, it's likely to break
something more important, either now or in the unforeseeable future.

Check the markup by all means but once you're sure that it meets the
standard, it's up to the other accessibility dependencies to catch up.

HTH,

Bim

From: Beranek, Nicholas
Date: Mon, Nov 06 2017 4:47PM
Subject: Re: html 5 required
← Previous message | Next message →

Hi Diane, I recommend keeping the required attribute. For compatibility, I would add the value "required", as well. You're encountering expected behavior with NVDA and Firefox because, by definition, since a value is required, lack of a value, or null value, would be invalid. I am always hesitant to include a hack to appease a browser/AT, and the use of the required attribute is a sufficient technique.

Nick Beranek
Capital One

On Nov 6, 2017, at 5:17 PM, Tomlins Diane < = EMAIL ADDRESS REMOVED = <mailto: = EMAIL ADDRESS REMOVED = >> wrote:


This just came up for us, and we just switched 70+ code files to use the html 5 "required' attribute. Now we find in testing, using NVDA 2017.3 with Firefox, NVDA announces empty fields as "invalid entry" the first time the user focuses on them, even before the error checking that takes place when a user hits the Submit button. So I would think this would make things confusing for AT users.

We tried adding aria-required="true" but that didn't help since we still have the "required" attribute in there too.

If I understand the replies to this thread, the "required' attribute is still a patchwork of support between browsers and AT??

Our developers won't be thrilled to back-pedal to take out the attribute they just put in :-/

Any possible workaround besides going back?

Thanks!

Diane R Tomlins
HCA IT&S | Digital Media
Accessibility SME


From: Steve Faulkner
Date: Mon, Nov 06 2017 5:47PM
Subject: Re: html 5 required
← Previous message | Next message →

>
> Now we find in testing, using NVDA 2017.3 with Firefox, NVDA announces
> empty fields as "invalid entry" the first time the user focuses on them,
> even before the error checking that takes place when a user hits the Submit
> button.


This is not due to any screen reader, it is due to the required attribute
being exposed as required and invalid in browser accessibility APIs. The
reasoning behind this is that until a required control has received some
user input, it does not meet its validation constraints and is therefore in
an invalid state.

discussion of this is in a related Firefox bug
https://bugzilla.mozilla.org/show_bug.cgi?idf6544



--

Regards

SteveF
Current Standards Work @W3C
<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>;

On 6 November 2017 at 23:47, Beranek, Nicholas via WebAIM-Forum <
= EMAIL ADDRESS REMOVED = > wrote:

> Hi Diane, I recommend keeping the required attribute. For compatibility, I
> would add the value "required", as well. You're encountering expected
> behavior with NVDA and Firefox because, by definition, since a value is
> required, lack of a value, or null value, would be invalid. I am always
> hesitant to include a hack to appease a browser/AT, and the use of the
> required attribute is a sufficient technique.
>
> Nick Beranek
> Capital One
>
> On Nov 6, 2017, at 5:17 PM, Tomlins Diane <Diane.Tomlins@HCAhealthcare.
> com<mailto: = EMAIL ADDRESS REMOVED = >> wrote:
>
>
> This just came up for us, and we just switched 70+ code files to use the
> html 5 "required' attribute. Now we find in testing, using NVDA 2017.3 with
> Firefox, NVDA announces empty fields as "invalid entry" the first time the
> user focuses on them, even before the error checking that takes place when
> a user hits the Submit button. So I would think this would make things
> confusing for AT users.
>
> We tried adding aria-required="true" but that didn't help since we still
> have the "required" attribute in there too.
>
> If I understand the replies to this thread, the "required' attribute is
> still a patchwork of support between browsers and AT??
>
> Our developers won't be thrilled to back-pedal to take out the attribute
> they just put in :-/
>
> Any possible workaround besides going back?
>
> Thanks!
>
> Diane R Tomlins
> HCA IT&S | Digital Media
> Accessibility SME
>
>
>

From: Tomlins Diane
Date: Wed, Nov 08 2017 8:55AM
Subject: Re: html 5 required
← Previous message | No next message

Thanks everyone for your input, very helpful. Since it's apparent NVDA users are accustomed to it and it's a Firefox bug, then we'll move forward with the "required" value. I did run across a form on another site that did exactly the same thing!

Diane R Tomlins
HCA IT&S | Digital Media
Accessibility SME