Skip to content

Commit

Permalink
Add CHANGELOG entry
Browse files Browse the repository at this point in the history
  • Loading branch information
NickColley committed Jun 6, 2019
1 parent eff7b5d commit a33f173
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@

💥 Breaking changes:

- Make radios and checkboxes components easier to link to from the error summary component

You should check that clicking a link from the error summary to radios or checkboxes results in the first input being focused.

The `id` of the first input in a set of radios or checkboxes will no longer be suffixed with `-1`. This means that it will be the same as your `idPrefix`, or if `idPrefix` is not set it'll be the same as the `name`.

We've made this change to make it easier to link from the error summary to radios or checkboxes, if you we're working around this before by setting the first input's `item.id` to the same as the `name` you can now remove this.

To migrate you can update your error summary so it links to the first element, for example if you are using an `idPrefix` option of `question`, your error summary can now link to `#question` instead of `#question-1`.

If you cannot change your error summary, you could change your component to set the `item.id` option for the first input, for example:

```javascript
{{ govukRadios({
idPrefix: "question",
name: "question",
items: [
{
id: "question-1",
value: "yes",
text: "Yes"
},
{
value: "no",
text: "No"
}
]
}) }}
```

([PR #1426](https://github.com/alphagov/govuk-frontend/pull/1426))

- Remove `govuk-focusable`, `govuk-focusable-fill` mixins, introduce `govuk-focus-text` mixin.

To migrate:
Expand Down

0 comments on commit a33f173

Please sign in to comment.