E-mail List Archives

Re: required field not being announced in Firefox/NVDA

for

From: Beranek, Nicholas
Date: Oct 13, 2017 1:47PM


Thanks, Greg.

That code is fine. I wonder if it’s your HTML5 validation, including the use of the setCustomValidity method. I want you to check if this fork works as you’d expect: http://jsfiddle.net/jna1mduv/

What I found was that the error message generated was rendered as an alert. With alerts, only the message reads out; the queue is cleared out and replaced by the alert. This is likely why you’re not hearing the label on invalid.

Nick

On 10/13/17, 2:52 PM, "Greg Gamble" < <EMAIL REMOVED> > wrote:

This is an example of the code Angela is talking about.

<div class="form-group">
<label for="MainContent_txtUserName" id="MainContent_lblUsername" class="col-sm-3 control-label ">Username</label>
<div class="col-sm-4">
<input name="ctl00$MainContent$txtUserName" type="text" id="MainContent_txtUserName"
class="form-control" required="true" autofocus="true" placeholder="Username"
oninvalid="setCustomValidity(&#39;Username required&#39;)" oninput="setCustomValidity(&#39;&#39;)" />
</div>
</div>



Greg Gamble
p - 360-704-4376



-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Beranek, Nicholas via WebAIM-Forum
Sent: Friday, October 13, 2017 11:35 AM
To: Angela French < <EMAIL REMOVED> >; WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] required field not being announced in Firefox/NVDA

Again, code would be very helpful. It sounds like your labels aren’t associated properly with the inputs.

On 10/13/17, 2:30 PM, "Angela French" < <EMAIL REMOVED> > wrote:

It isn't that it doesn't honor the html required attribute. It does say "please fill out the required field" it just doesn't read the label associated with the required field. Thus if there are more than one required fields the user doesn't know which one is being referred to.

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Beranek, Nicholas via WebAIM-Forum
Sent: Friday, October 13, 2017 11:09 AM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] required field not being announced in Firefox/NVDA

Hi Angela, can you show us the code in context? There’s no reason for NVDA and Firefox not to honor aria-required and the HTML5 required attribute.

Nick Beranek
Capital One

On 10/12/17, 8:01 PM, "WebAIM-Forum on behalf of Angela French" < <EMAIL REMOVED> on behalf of <EMAIL REMOVED> > wrote:

I have tried the following and none of them read the label of the required field after alerting the user to please fill in the require field.
aria-required="true"
required
required=""
required="true"

I give up.

Angela


-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of JP Jamous
Sent: Thursday, October 12, 2017 12:03 PM
To: 'WebAIM Discussion List' < <EMAIL REMOVED> >
Subject: Re: [WebAIM] required field not being announced in Firefox/NVDA

Semantically, it should be required="true". Required is the short-hand writing for it and browsers are forgiving as we know them.

Personally, I prefer required="true". Each HTML attribute has a value. Why do this one differently.

Did you try to use aria-required="true" to see if NVDA would respond differently?

Just keep in mind that NVDA was not created to function with either IE or edge. So having it fail with those 2 does not come as a surprise to me. In fact, I would consider it normal behavior.

-----Original Message-----
From: WebAIM-Forum [mailto: <EMAIL REMOVED> ] On Behalf Of Angela French
Sent: Thursday, October 12, 2017 1:18 PM
To: WebAim Forum ( <EMAIL REMOVED> ) < <EMAIL REMOVED> >
Subject: [WebAIM] required field not being announced in Firefox/NVDA

We are using the html required element (required="true") to indicate required fields. The problem when testing with NVDA is that focus goes to the required field but doesn't read the form label so the screen reader user doesn't know which required field they missed. The only way to find out, it seems, is to go back an element in the form and then forward again so the label will be read. Is this a bug, or are we doing something wrong? It works fine in Chrome. We've given up on IE or Edge with NVDA,

Thank you

Angela French
Internet/Intranet Specialist
Washington State Board for Community and Technical Colleges
360-704-4316
<EMAIL REMOVED> <mailto: <EMAIL REMOVED> >
www.sbctc.edu<;http://www.sbctc.edu/>;at http://webaim.org/discussion/archives
The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.