Character count change history

Date Changed Description
May 2025 GOV.UK Frontend v5.10.1

Added error border colour when rendered with error message.

Mar 2025 GOV.UK Frontend v5.9.0

Changed component id attribute to be based on name parameter by default.

Added focused error state.

Oct 2024 Guidance

Added details of accessibility improvements we made in v4.1.0.

Mar 2024 GOV.UK Frontend v5.3.0

Changed HTML structure to merge component wrapper and form group.

Dec 2023 GOV.UK Frontend v5.0.0

Throw ElementError during instantiation for missing elements.

Nov 2022 GOV.UK Frontend v4.4.0

Added options to localise the textarea description, count message and input description.

May 2022 GOV.UK Frontend v4.1.0

Removed aria-live attribute.

Added new live-updated accessible announcements.

Removed maxlength attribute from textarea after JavaScript has been initialised.

May 2022 Guidance

Added known issues with assistive technology.

May 2022 Guidance

Explained that input shows a red border only when user exceeds character limit.

Jan 2022 Guidance

Explained that the component counts emojis and some non-Latin characters as multiple characters.

Dec 2021 GOV.UK Frontend v4.0.0

Changed JavaScript initialisation to look for count message HTML element in whole page, rather than only within character count element

Feb 2021 GOV.UK Frontend v3.11.0

Fixed JavaScript error when character count ID starts with a number.

Used tabular numbers for the count.

Aug 2020 GOV.UK Frontend v3.8.1

Fixed textarea shrinking when users exceed the character limit.

Jul 2020 GOV.UK Frontend v3.8.0

Added spellcheck parameter.

Added functionality to preserve the component state when navigating ‘back’ in the browser.

Jan 2020 GOV.UK Frontend v3.5.0

Added option to add classes to the count message.

Nov 2019 GOV.UK Frontend v3.4.0

Fixed classes for error state.

Sept 2019 GOV.UK Frontend v3.2.0

Added option to add classes to the form group wrapper.

Oct 2018 GOV.UK Frontend v2.2.0

Component introduced.