dwp / govuk-casa

Framework for creating simple GOVUK Collect-And-Submit-Applications
ISC License
34 stars 24 forks source link

Hints and error messages don't always describe form fields #2

Closed colinrotherham closed 5 years ago

colinrotherham commented 5 years ago

We've noticed the address macro isn't linking up field hints and error messages correctly.

For guidance, see the aria-describedby attribute on this input https://design-system.service.gov.uk/components/error-message/label/index.html

In CASA The inputs are not described by the error message and hint

In the Design System The inputs are described by the error message and hint

For radios/checkboxes we're half way there, but both the hint and the error message should describe the wrapping fieldset as shown here: http://govuk-frontend-review.herokuapp.com/components/radios/with-all-fieldset-attributes/preview

address component

Thanks

lhokktyn commented 5 years ago

Thanks Colin. The casaPostalAddressObject() macro and accompanying dateObject validator has recently changed to highlight the individual input field errors, rather than one encompassing the whole group. Would you mind testing these changes and confirming whether it resolves the above? Thanks

colinrotherham commented 5 years ago

Thanks, I spotted this yesterday when rebasing our fork. It's much better!

More testing next week 🎉

colinrotherham commented 5 years ago

Closing this, thank you for all the fixes