Character count brevity or legal
character-count-brevity-or-legal
Character count only for brevity or a legal cap — not to paper over backend field limits (raise the limit). Skip if length is implied (phone/zip) or if well over 99% of users will never hit the cap (e.g. address at 250). Provide a non-JS backup message. Dual-cite GOV.UK raise-backend + no-maxlength-truncate vs USWDS using `maxlength` for the component. No winner on truncate.
Description
USWDS character count is for brevity or a legal cap—not to paper over backend field limits (raise the limit instead). Skip when length is implied (phone/zip) or when well over 99% of users will never hit the cap. Provide a non-JS backup message. Dual-cite GOV.UK raise-backend and no-maxlength-truncate versus USWDS `maxlength` usage without picking a truncate winner. Counting to hide a short backend limit, or counting phone/zip/rarely-hit address fields, fails.
When to use
Textareas with a real brevity need or legal maximum users might hit.
Not when
Phone/zip implied lengths, or caps almost nobody will hit such as address at 250.
Agent hint
Use character count only for brevity or legal caps; raise backend limits instead of faking them.
Count is shown only for brevity or a legal cap; backend limit is raised rather than used as a fake cap; implied-length and never-hit caps omit the count; a non-JS backup message exists.
Count papers over a short backend limit; or count on phone/zip / an address field almost nobody will hit.
Citations
USWDS — Character count
https://designsystem.digital.gov/components/character-count/