Description
User should be able to submit a form with autocomplete with a null
value because they're being presented with a text box (the UI itself doesn't suggest it is a select) and text boxes natively allow you to submit a null value on the client side (thanks @joelanman!).
We should add to guidance that select
should always have <option value=""></option>
to ensure that even if user is getting the native select
experience, they can still submit a null
value.
Handling of null
values should be the concern of server side validation.
The guidance here needs to be rethought: https://github.com/alphagov/accessible-autocomplete#null-options
We should consider injecting a null value into a select if we detect it doesn't contain one.
We could also consider adding some optional client side validation (eg. if user opens autocomplete but doesn't select a value, show error message). However this could be a lot of work and wouldn't necessarily fit in with other client side validation the service might already have in place.