x-govuk / govuk-components

Lightweight Ruby on Rails components for developing with the GOV.UK Design System.
https://govuk-components.netlify.app
MIT License
150 stars 20 forks source link

Allow tabs to have set ids #532

Closed misaka closed 6 months ago

misaka commented 6 months ago

The tab id attribute is currently based on the label given the tab. In some cases, however, this label may be dynamic, e.g. if the label includes the number of records included in that tab. Having an id that changes this way can get in the way of testing or potentially other functionality that may depend on the id being static.

netlify[bot] commented 6 months ago

Deploy request for govuk-components pending review.

Visit the deploys page to approve it

Name Link
Latest commit fe49ceba1ea1dfdce896311f643d4ae769c543e5
misaka commented 6 months ago

This came out of work we were doing on our own project. I don't know how useful it is, np if it's not seen as worth adding, just thought I'd offer the contribution if it is useful.