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

Throw errors during Accordion initialisation if key HTML elements are missing #4126

Closed
1 task
Tracked by #3478
romaricpascal opened this issue Aug 24, 2023 · 2 comments · Fixed by #4266 or #4330
Closed
1 task
Tracked by #3478

Throw errors during Accordion initialisation if key HTML elements are missing #4126

romaricpascal opened this issue Aug 24, 2023 · 2 comments · Fixed by #4266 or #4330
Assignees
Milestone

Comments

@romaricpascal
Copy link
Member

What

Update our JavaScript components requiring specific HTML elements to be present so they throw a MissingElementError (extending GOVUKFrontendError) rather than silently fail:

  • The sections of the accordion
  • Header in the section
  • <span> header
  • Heading
  • Toggle icon or text

Why

This is part of our work to have our components throw rather than silently return during initialisation.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Component has been updated to throw errors
@romaricpascal romaricpascal added awaiting triage Needs triaging by team javascript accordion and removed awaiting triage Needs triaging by team labels Aug 24, 2023
@romaricpascal romaricpascal added this to the v5.0 milestone Aug 24, 2023
@romaricpascal
Copy link
Member Author

@domoscargin
Copy link
Contributor

Moving this to blocked while we work on #4299, to minimise conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment