Sort code form example
Examples
From a purely technical perspective the first three examples are all accessibly equivalent, while real-world mileage may differ. The final example is from the UK GDS and is the recommended approach.
Native HTML version
HTML
CSS
Native HTML with aria-label
HTML
Using only roles and aria
HTML
UK GDS example
The UK GDS suggests to use a single text field for all 6 numerics.
Barclays use something similar to this, but put a hyphen in the input as each character is typed.
HTML
Notes
Do not set max-length on the text inputs.
It's advised that focus should not move to the next field automatically, though the industry norm appears to do so.
Advice from Adam Silver
Using multi-input form fields for things like card numbers, sort codes and reference numbers?
Are you doing this to help users avoid errors and check answers?
These are bad reasons to use multiple inputs for one field.
Heres 2 examples of why:
Ref: