UKHomeOfficeForms / hof

Bootstrap a HOF project
MIT License
15 stars 17 forks source link

ASCS-139 Add id to date input div to fix missing link from error alert #393

Closed jamiecarterHO closed 1 year ago

jamiecarterHO commented 1 year ago

What

Relating to ASCS-139 Adding an id of {{key}} to the container div for the date element.

Why

ASCS-139 reports an issue with samepage links from individual error messages in the 'There's a problem' error alert box to the element that errored when that error is on an incorrectly filled date component.

In hof v20.0.1 the components/date/templates/date.html had the following line removed: <input type="hidden" name="{{key}}" /> Without it there is no id or name with {{key}} in the date component template for the error link to move to.

Testing

Issue found on ASC running hof@20.2.13 and issue fixed with this update made locally. This issue is not found on UAT environments of forms running hof < 20.0.1 e.g. UKVI

jamiecarterHO commented 1 year ago

The original element linked to by errors with the {{key}} element was removed in this commit

SarahJaneLuff commented 1 year ago

lgtm