Form checkboxes example

With aria controls attributes

Aria controls attributes are applied to the checkboxes only if JavaScript is enabled.

How it looks (preview)

What areas are you interested in?
Select all that apply.

How to call this example

<%= render "govuk_publishing_components/components/checkboxes", {
  name: "aria_controls[]",
  heading: "What areas are you interested in?",
  items: [
    {
      label: "Farming and the environment",
      value: "farming",
      controls: "js-live-results"
    },
    {
      label: "Water recycling",
      value: "water",
      controls: "js-live-results"
    }
  ]
} %>