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

Expand documentation of fieldset to describe how to have errors and hints #3790

Open
2 tasks
romaricpascal opened this issue May 10, 2024 · 2 comments
Open
2 tasks
Labels
documentation User requests new documentation or improvements to existing documentation fieldset small story

Comments

@romaricpascal
Copy link
Member

What

Add example of how to render errors and hints inside a Fieldset component, especially:

  • the markup for the errors (the Error message component can help with that) and the hint (the Hint component is private, so that'll call for a discussion on what to do there)
  • applying correct styles to the fieldset when an error happens (the Date input can provide an example of how to achieve this)
  • how to accessibly link the error and hint to the fieldset using aria-describedby (similarly the Date input might help with that)

Why

This would help people implement inputs split across multiple fields in a similar fashion as the Date input. Thanks @edwardhorsford for bringing this to our attention.

image

Who needs to work on this

Developers, Tech writers

Who needs to review this

Developers, Tech writers

Done when

  • The Fieldset component documentation explains how to have errors and hints
  • [Stretch] we've discussed whether to abstract rendering the errors and hint as part of the component options
@romaricpascal romaricpascal added documentation User requests new documentation or improvements to existing documentation fieldset small story labels May 10, 2024
@romaricpascal
Copy link
Member Author

This overlaps with: alphagov/govuk-frontend#1166

@edwardhorsford
Copy link
Contributor

Haha past Ed strikes again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation User requests new documentation or improvements to existing documentation fieldset small story
Projects
None yet
Development

No branches or pull requests

2 participants