feat(add another)!: improvements and accessibility fixes for updated component#2151
feat(add another)!: improvements and accessibility fixes for updated component#2151Chris Pymm (chrispymm) wants to merge 26 commits intomainfrom
Conversation
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
3ab5f85 to
362beb0
Compare
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
3 similar comments
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
61276db to
5d07e08
Compare
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
2 similar comments
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
| const $legend = $fieldset.querySelector('legend') | ||
|
|
||
| if ($legend && $legend instanceof HTMLLegendElement) { | ||
| $legend.innerHTML = `${labelText}<span class="govuk-visually-hidden">for ${this.config.itemLabel.toLowerCase()} ${index + 1}</span>` |
Check failure
Code scanning / CodeQL
DOM text reinterpreted as HTML High
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
…omponent Allow unique indexes for fieldset legends, remove buttons and field labels BREAKING CHANGE: Move templating into a nunjucks macro
…components in new items
…ents with consistent naming
…e typescript happy
cada067 to
cc33bfb
Compare
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
…d use govuk-grid-row
9a119e1 to
090e909
Compare
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
This change refactors the macro for the component to remove the itemTemplate from being public and keep it internal to the component. Instead of passing all items as one chunk of html, users will passs in an array of items which the component will wrap with the item fieldset. This PR also no longer relies on the user setting content in an html template, but creates it own <template> element from the first item on intialization.
…r inline variant Refactor the params passed into the item template. Lean harder on GOV.UK conventions. Item now accepts a `fieldset` option which matches the standard GOV.UK fieldset. Update error handling of the inline layout option. This functions essentially the same as the GOV.UK date field as the structure is the same - a fieldset with nested input fields. This allows the error message to span the horizontally laid out fields and not disrupt the layout.
|
🚀 Deployed to preview environment! If this is the first deploy, you may have to wait a few minutes for your preview site to be ready on the following URL: https://moj-frontend-pr-2151.apps.live.cloud-platform.service.justice.gov.uk Username: |
BREAKING CHANGE: