designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

Documentation and guidance for how to best localize formatting of numbers

Open Camulos opened this issue 8 months ago • 1 comments

Do we need guidance and documentation for how to make sure various formatting rules for numbers and alike is done correctly, accessible and friendly for both users and datause?

  • Thousand separator (space in international standard and standard in Norway (exception for some economic contexts)
  • Some numbers is divided in various ways, like fødselsnummer, organisasjonsnummer and telephone numbers
  • In-line text, you usually do not want a line break in the middle of such numbers, so how and when to use non-breaking spaces.
  • Other times the spacing and format could be set by the locale setting?

Camulos avatar May 12 '25 11:05 Camulos

Shared in DS-team chat: https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/

How/Why the use of type, inputmode and pattern should be considered to make sure that the user of touch-devices is presented the most user friendly options (only number in screen-keyboard) and also to avoid unpredicted behavior like steps when using arrow up/down.

Camulos avatar May 12 '25 14:05 Camulos