Skip to content

Update error-identification.html #4431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion understanding/20/error-identification.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,24 @@ <h2>Intent of Error Identification</h2>
<li>the user enters alphabetic characters or parentheses into their phone number field that only accepts numbers;</li>
<li>the user enters a bid that is below the previous bid or the minimum bid increment.</li>
</ul>

<h3>Note on using native HTML form validation</h3>
<p>With native HTML form validation, the use of the <code>required</code> attribute on a field has the consequence that
when trying to submit the form with this field empty, the user agent will automatically display a generic error message that a value
in the field is required, and set the focus to the first field missing required input.
The user agent will generally also scroll the page so that the field in error and the generated error message will be visible in the viewport.</p>
<p>In most common user agent and screen reader combinations, the screen reader will read the generic error message
and the programmatic name of the required field.
While this in principle meets the requirements of this Success Criterion,
it should be noted that there are several disadvantages related to this approach:</p>
<ul>
<li>Depending on the user agent, the message may be non-permanent, or fail to scroll with the page</li>
<li>Depending on the user agent, zoomed-in (magnified) content may display the error message unmagnified;
the message may may be too small for users to read</li>
<li>HTML validation messages for fields with <code>type="text"</code> will be unspecific, i.e. they will not provide helpful suggestions where these may be needed</li>
<li>If several errors are present, only the first error is exposed.
Once the user has provided an input that conforms to the type of field and resubmits the form,
the next error (if present) will be exposed. This means that repeated resubmissions and corrections may be required.</li>
</ul>
<div class="note">
<p>If a user enters a value that is too high or too low, and the coding on the page automatically
changes that value to fall within the allowed range, the user's error would still
Expand Down