Skip to content
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

Error and success message handling #33

Open
rianrietveld opened this issue Mar 21, 2020 · 0 comments
Open

Error and success message handling #33

rianrietveld opened this issue Mar 21, 2020 · 0 comments

Comments

@rianrietveld
Copy link

For form feedback handling the following is needed:

If a field is required it should be indicated as such. Visually by adding a * and indicating at the top of the form (first step) what the * means.

Add in the inputs a required attribute if it's required. If you want to keep your own error messages and not the default HTML5 ones, add novalidate to the form element, like
<form action="#" novalidate>

And for the inputs :
<input type="text" name="companyName" aria-describedby="" class="text-field-input" required>

Adding the error messages on top of the page dynamically is good. For blind people, to get this info, we can add an aria-live attribute to all dynamically generated info.
Like:
<p class="error" aria-live="polite" style="display: none;">Wil je je bedrijfsnaam alsjeblieft invullen?</p>
<p class="success" aria-live="polite" style="display: none;">Je aanmelding is compleet!</p>

<div  id="address" aria-live="polite"  style="display: none;">
    <p> We hebben je adres gevonden. Klopt dit niet? Pas dan hierboven je postcode en huisnummer aan. </p>
[...]
</div>

Then as the display:none; toggles, the change of content is announced.

If extra info is given as text on an image, give the image a good alt attibute. And remove the role presentation.
Like:
<img id="tegoedje" alt="Bijna goed." src="/img/bijnagoed.fe91f414.svg">

Maybe this needs to be styled yet, but the address is very very small.
Screenshot 2020-03-21 at 11 44 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant