Skip to content

Commit

Permalink
Add CHANGELOG entry
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Mar 6, 2024
1 parent c78eda8 commit 3a7f373
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ For advice on how to use these release notes see [our guidance on staying up to

## Unreleased

#### Update the HTML for the character count

We've updated the HTML for the character count.

The component wrapper `data-module="govuk-character-count"` and its form group `class="govuk-form-group"` are now combined as the same `<div>`. The hint text used as the count message is now placed directly after the `<textarea>`.

If you're not using Nunjucks macros, then you should:

- move the `govuk-form-group` class from the form group to the component wrapper `<div>`
- move the `govuk-form-group--error` class (optional) from the form group to the component wrapper `<div>`
- move any other custom classes and attributes from the form group to the component wrapper `<div>`
- remove the opening `<div>` and closing `</div>` tags previously used by the form group

For example, see how the HTML below:

```html
<div class="govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
<div class="form-group form-group--error">
<!-- // -->
</div>
</div>
```

would now be:

```html
<div class="form-group form-group--error govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
<!-- // -->
</div>
```

[Check your changes against the character count example in the Design System](https://design-system.service.gov.uk/components/character-count/#character-count-example) to make sure you have correctly implemented them.

This change was introduced in [pull request #4566: Use Character count `formGroup` as module wrapper](https://github.com/alphagov/govuk-frontend/pull/4566).

### Fixes

- [#4811: Use `KeyboardEvent.key` over deprecated `KeyboardEvent.keyCode` in the Tabs component](https://github.com/alphagov/govuk-frontend/pull/4811)
Expand Down

0 comments on commit 3a7f373

Please sign in to comment.