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

bug: Error summary links won't focus form inputs on click when entered using error-links #664

Closed
ethanWallace opened this issue Oct 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working development Development tasks

Comments

@ethanWallace
Copy link
Collaborator

ethanWallace commented Oct 9, 2024

Summary

If error links are manually entered using the error-links property, the error links won't focus GC Design System form elements properly. The error seems to come from a logic error in the internal focusElement() of the gcds-error-summary component.

Example

<form>
<gcds-error-summary
  id="error-summary"
  error-links='{
    "#foo":"I am foo",
    "#shipmentWeight": "Error summary item."
  }'

  heading="Please correct the following errors"
></gcds-error-summary>

<label for="foo">I am a label</label>
<input id="foo" type="text"/>

<gcds-input
  name="shipmentWeight"
  input-id="shipmentWeight"
  id="shipmentWeight"
  size="7"
  type="number"
  label="Test"
></gcds-input>
</form>

https://cds-snc.freshdesk.com/a/tickets/19262

@jprince-cds
Copy link

jprince-cds commented Oct 9, 2024

Please ping the Support team once resolved, so we can circle back with client in Freshdesk Ticket #19262. Thanks!

@ethanWallace ethanWallace self-assigned this Oct 10, 2024
@ethanWallace ethanWallace added the development Development tasks label Oct 10, 2024
@ethanWallace
Copy link
Collaborator Author

This issue was fixed with the release of version v0.26.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development Development tasks
Projects
None yet
Development

No branches or pull requests

2 participants