WebAIM - Web Accessibility In Mind

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