Problem/Motivation

1. When client-side validation is disabled in webforms (which is required for accessible web forms)
2. And we submit the form when radios and checkboxes are required
3. Then the error at the top of the screen does not link to the error message in checkboxes or radios

Steps to reproduce

Proposed resolution

1. Update field.twig to allow messages to have attributes as well as message content
2. Update form element preprocessing to provide error message as well as attribute

Comments

richardgaunt created an issue. See original summary.

fionamorrison23’s picture

richardgaunt’s picture

richardgaunt’s picture

  • c5c2f244 committed on 1.x
    Issue #3505451 by richardgaunt, fionamorrison23, alan.cole: Errors are...
fionamorrison23’s picture

Assigned: richardgaunt » danielgry
Status: Active » Needs review

fionamorrison23’s picture

danielgry’s picture

StatusFileSize
new6.76 MB

Verified and tested on latest dev version

Testing Results:
1. Verified that when client-side validation is disabled, submitting a form with required radio or checkbox fields triggers error messages at the top of the form
2. Clicking on the error message now correctly moves focus to the relevant radio or checkbox field
3. Verified that form validation and error handling work consistently across all form elements without introducing new issues

Screen recording attached above.

danielgry’s picture

Assigned: danielgry » richardgaunt
Status: Needs review » Reviewed & tested by the community
fionamorrison23’s picture

richardgaunt’s picture

Version: 1.9.0 » 1.10.0
richardgaunt’s picture

Status: Reviewed & tested by the community » Fixed
fionamorrison23’s picture

Version: 1.10.0 » 1.9.0
fionamorrison23’s picture

fionamorrison23’s picture

Version: 1.9.0 » 1.10.0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.