Skip to content

Commit

Permalink
Ensure character count id is unique on the page
Browse files Browse the repository at this point in the history
We've made changes in GOV.UK Frontend v4.0.0 so that the JS now
looks through the whole page rather than just within the module.
This means we need to make sure the `id` for character counts on
the same page are unique.

I don't think this should be an issue as we put our examples within iframes,
but it's good to be consistent
  • Loading branch information
Vanita Barrett committed Dec 16, 2021
1 parent 401d32f commit ef04c54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/character-count/threshold/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ layout: layout-example.njk
{% from "govuk/components/character-count/macro.njk" import govukCharacterCount %}

{{ govukCharacterCount({
name: "word-count",
id: "word-count",
name: "threshold",
id: "threshold",
maxlength: 112,
threshold: 75,
value: "Type another letter into this field after this message to see the threshold feature",
Expand Down

0 comments on commit ef04c54

Please sign in to comment.