alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.14k stars 319 forks source link

date-input: id is documented as optional but used as required to create hintId and errorId #1557

Closed dabd closed 4 years ago

dabd commented 4 years ago

In the date-input component id is documented as optional but treated as a required parameter when creating the hintId and errorId (if it is not provided it will generate an id starting with hyphen, which is probably not the intended result). It is treated as optional elsewhere.

Should it be considered as a required parameter instead?

In the radios component when idPrefix is not supplied it falls back to using name. Does it make sense to use the same approach here?

Same problem here: https://github.com/alphagov/govuk-frontend/blob/master/src/govuk/components/tabs/template.njk#L3

StheffanyHadlich commented 4 years ago

Can I work in this issue?

NickColley commented 4 years ago

Heya @StheffanyHadlich!

Thanks for offering to help out, we think this issue is more than just documentation so the GOV.UK Design System team will pick this up.

We have some first timer issues over on the GOV.UK Design System website repository if you're interested in contributing there: https://github.com/alphagov/govuk-design-system/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22

StheffanyHadlich commented 4 years ago

Oh, thank you

kellylee-gds commented 4 years ago

Review from @m-green