diff --git a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_0_desktop.png b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_0_desktop.png index 615220ebc8..2be61e0fbc 100644 --- a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_0_desktop.png +++ b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_0_desktop.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14b9afe6f8bd58dd04f462fd1a9b75313bb189e68f8a3fc84637202c0b5fa357 -size 45250 +oid sha256:9401c79b73a9c7482b8bef23e934f3c2bf55ccab977ce938630150a64ba6e7c0 +size 47169 diff --git a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_1_tablet.png b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_1_tablet.png index 49bbe7e111..39caef90cf 100644 --- a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_1_tablet.png +++ b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_1_tablet.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:260f80e7eb42ec8006fb405ba983a334830c7c12f8e75aee2874963c051296a3 -size 41400 +oid sha256:d7dd98e12f3bb6181f2d2436c9d30fb007f1788ca8265bc064206e94ae7bd16f +size 43508 diff --git a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_2_mobile.png b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_2_mobile.png index efb07245b4..f582fc54dc 100644 --- a/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_2_mobile.png +++ b/backstop_data/bitmaps_reference/ds-vr-test__components_checkboxes_example-checkboxes-with-descriptions_0_document_2_mobile.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b09cc3da869de24b55488255aec047e56c46b1d736e365262e5470aa00353fd -size 37877 +oid sha256:4fd0c0be270ffdecb3b48094583069fe1ea57fbbed03f416937f63e0dd0b4ee9 +size 40012 diff --git a/src/components/checkboxes/_macro-options.md b/src/components/checkboxes/_macro-options.md index d70202c929..4344a2cd52 100644 --- a/src/components/checkboxes/_macro-options.md +++ b/src/components/checkboxes/_macro-options.md @@ -6,7 +6,7 @@ | legendClasses | string | false | Classes to add to the fieldset‘s legend | | description | string | false | Hint text following the fieldset‘s legend to help users answer | | attributes | object | false | HTML attributes (for example, data attributes) to add to the fieldset | -| checkboxesLabel | string | true | A prompt for the checkboxes, for example, “Select all that apply” | +| checkboxesLabel | string | true (unless inside a radio) | A prompt for the checkboxes, for example, “Select all that apply” | | checkboxesLabelClasses | string | false | Classes to add to the checkboxes prompt element (`checkboxesLabel`) | | checkboxes | array`` | true | Settings for each [checkbox](#checkbox) | | borderless | boolean | false | Set to “true” to remove the border surrounding the input and label | diff --git a/src/components/checkboxes/_macro.njk b/src/components/checkboxes/_macro.njk index 512b752426..933838c4b4 100644 --- a/src/components/checkboxes/_macro.njk +++ b/src/components/checkboxes/_macro.njk @@ -5,7 +5,9 @@ {% from "components/button/_macro.njk" import onsButton %} {% set fields %} + {% if params.checkboxesLabel is defined %}

{{ params.checkboxesLabel }}

+ {% endif %} {% set hasOther = false %} {% for checkbox in params.checkboxes %} {% if checkbox.other %} diff --git a/src/components/checkboxes/example-checkboxes-with-descriptions.njk b/src/components/checkboxes/example-checkboxes-with-descriptions.njk index df26a92400..36d59729f1 100644 --- a/src/components/checkboxes/example-checkboxes-with-descriptions.njk +++ b/src/components/checkboxes/example-checkboxes-with-descriptions.njk @@ -8,6 +8,7 @@ }) %} {{ onsCheckboxes({ + "checkboxesLabel": "Select all that apply", "dontWrap": true, "name": "central-heating", "checkboxes": [