Amount input — accessibility
Keyboard
- Typing digits,
,and.works as described in Usage; letters and other characters are ignored. - Arrow ↑ / ↓ increment / decrement by one (replacement for the native number stepper).
- The caret stays after the same digit while grouping spaces appear or disappear, including right after the decimal comma (
12,+5→12,5). - Tab / Shift+Tab move focus normally; on blur an undecided dot (
12.5) becomes12,5.
ARIA
- Native
<input type="text">withinputMode="decimal"/"numeric"— mobile keyboards show digits. - Accessible name from the wrapping DS
Fieldlabel orariaLabel. aria-describedbylinks the hint / error under a DSFieldautomatically (useFieldDescribedBy); a host can passdescribedByexplicitly.aria-invalid="true"when the host marks the value invalid, and for a count (decimals={0}) left with an undecided dot (12.3) on blur — that value is not saved.- The unit suffix is
aria-hidden; the unit must be part of the label.
Focus
- Standard DS input focus ring on the shell (
.acrm-inputwrap:focus-within). - No focus traps; the field never moves focus on its own.
Contrast
- Text uses
--fgon--surface-100(AA). - Suffix uses the muted tone of
.acrm-amount-suffix; it repeats information already in the label, so it is not the only carrier of meaning. - Error state uses the DS field error ink (
--critical-ink) plusaria-invalid.
Known limits
- The dot rule applies to locales with a decimal comma (cs). In a decimal-dot locale (en) the comma is a grouping separator and the dot is always decimal.
- A refused keystroke gives no audible feedback — the value simply does not change.
Source: docs/text-field/amount-input.a11y.md · GitLab