Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to customise character count text that announces character/word limit / no-js fallback #2687

Closed
5 tasks done
Tracked by #1708
vanitabarrett opened this issue Jul 12, 2022 · 1 comment · Fixed by #2742
Closed
5 tasks done
Tracked by #1708

Comments

@vanitabarrett
Copy link
Contributor

vanitabarrett commented Jul 12, 2022

What

The character count has a 'count message' which is visually hidden when JavaScript is available, used by screenreader users. It tells the user the character or word limit for the character count, e.g: "You can enter up to 10 characters". It is visible when JavaScript is disabled, example:

Screenshot 2022-07-12 at 13 15 50

This issue is for adding the ability for users to customise that text. At the moment, it is hardcoded in the component template as "You can enter up to [x] [words/characters]".

Why

This functionality is needed for users to be able to fully translate the character count text.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

  • Character count macro options allow a user to pass translated text for the count message
  • This works whether they're setting maxwords or maxlength
  • We're not adding any hardcoded content order (i.e: expecting the 'count' number to appear in a certain place in the string
  • There is an example of this in the review app
  • There are tests for this
@vanitabarrett
Copy link
Contributor Author

@querkmachine Think this can be merged once we've resolved Claire's comment on the changelog?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants