Live demo: the country combobox
This page runs the component code from the UI Guidelines sample, built with React 18.3.1. The form around it is the sample's own example of use, with a Continue button added so you can see the value it would send.
What this shows, and what it doesn't. It shows the code running in your browser. It has not been tested with a screen reader, and it is not a claim that the component meets WCAG 2.2 AA: that needs testing with assistive technology and real users. The list uses your browser's own English country names.
Things to try
- Type
coteto find Côte d'Ivoire, oruk,usaorholland, which work through aliases. - With the keyboard only: Down Arrow to open the list, arrows to move, Enter to choose. Escape once closes the list and keeps your text; Escape again clears it.
- Press Tab while an option is highlighted: you leave the field without choosing it, as the spec says.
- Press Continue with the field empty to see the error, then type a full name and Tab away.
- On a phone, tap the field, type and tap a country.