You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There used to be documentation with this component explaining a hack to make inputs work as users expected in iOS (specifically activating the numeric keyboard on number inputs). Is this still relevant? I notice it's not in the current page
There used to be documentation with this component explaining a hack to make inputs work as users expected in iOS (specifically activating the numeric keyboard on number inputs). Is this still relevant? I notice it's not in the current page
Hi Paul,
It's still relevant – I believe that guidance was removed because we are now providing code examples, which we were not able to do when this content was in the service manual, and so it was more important to document 'implementation details' like that.
The code examples on the date input all use the pattern="[0-9]*" attribute, which triggers the keyboard on iOS.
Testing the "Apply for a Blue Badge" service. We saw two users with Voiceover on iOS run into issues when entering their date of birth. The first user expected it to auto-tab, getting stuck in the day field and then had issues getting back into the month field. The second user wasn't sure of what to do after entering the day, they said “I didn’t hear that one. Do I have to put dot there for month? Oh I have to go, ok. I’ve just done the day, and then” he then tried to find the dot button and gets stuck in the International keyboard, swiping the screen he finds year… swipes the screen until he finds the month input “I just want to go to month”.
I don't think the documentation specifically shows how to display a formatted date. It has "31 3 1980" in the examples, but this is not specifically spelt out in date patterns or a-z style guide. One of the reasons this has come up is that in my 30 years of non-government development, I've never come across a date format (anywhere in the world) where spaces are the separator!
Hello all. I'd like to understand why the text input based date picker is more usable / accessible than more a select element, or a calendar. Could you tell me or point me in the right direction?
I remember that there's been usability findings pointing to that direction, but it'd help me to understand what the these findings so I can be convinced myself and convince colleagues. Is there an article / blog post anywhere recapping on this?
(Thanks for the excellent work on the design system and its documentation).
We found similar problems with dropdowns regularly, which is why we generally recommend against them.
In terms of calendar controls, we haven't found a need when it comes to asking for a memorable date (like a date of birth), though it could be useful in other situations. The problem then is, if you use built-in browser calendars the user experience can vary wildly. If you use a custom calendar control you need to make sure it's fully accessible.
Have any prototypes / services considered a 'today' option on a date entry screen, so a user can - for example - select a 'today' radio button rather than enter data into the date fields under it? I realise it would often be inappropriate but for some services where a user can cancel / deregister on that particular day it might be helpful?
While testing this pattern in the design system with Safari and Voiceover, I've noticed that the text inputs offer a number input as an incrementable input (stepper). I can't see how this input format is described in the markup.
Would be great to be able to add attributes to the fieldset / legend or inputs within the nunjucks macro - I'm using data attributes on the fieldset to tell my application how I'd like to render the output from the component when it gets to summary time - but currently I have to hand-crank the HTML for these components - not a biggie but not difficult to fix either...
In testing date inputs for a pension-age benefit application, most of our users expected the selection to auto-tab between fields. Because many were not touch typing and were looking at the keyboard, they didn’t notice they had entered the full date (DDMMYYYY) into a single field.
They then found it difficult to correct, especially when the input overflowed the visible field. Some struggled to place the cursor and deleted characters one at a time, which was slow and frustrating.
We know auto-tab should be avoided for accessibility. We were considering using maxlength to limit input, but are aware this risks silent failure if users keep typing.
Has anyone explored this trade-off or found better approaches for pension age customers?
@Jdoyle286 Maybe if you enter a whole date in the day field then when you tab it could realise and fix it, i.e. move the extra digits to the other fields for you and move the cursor to the next tab position after the date input.
@Jdoyle286 just to double check - are they entering a separator (like / ) or are they just typing DDMMYYYY and expecting autotab? I'm just thinking if they are typing / you could consider tabbing then
I’ve seen similar expectations of auto-tabbing after entering 2 digits. However I’ve not yet observed it being unrecoverable, more of a minor annoyance or unmet expectation.
I’ve considered having it auto-tab only when you enter a 3rd digit into the day or month input (and the it’d move that 3rd digit in). Alternatively we could explore auto-tabbing after 2 digits, but with some debouncing to prevent tabbing twice if the user also pressed tab at the same time. Would have to consider any other unexpected side-effects though!
I've seen this a lot, especially with people who need to look at the keyboard as they type.
Agree with @rjmunro - if you get more input in the first field that you expect, could this get distributed to the other fields without hassling the user about it?
We have observed these issues with our internal service users, who also use a plethora of other systems that do not require tabbing (so they need to develop two sets of “muscle memory” and remember to apply the correct one on the correct service).
We have therefore developed a (fully accessible) new date component, which does not require tabbing and users can also paste copied dates into it (often a user need for them). It also has a date picker, which meets a different user need, present in some scenarios.
It has tested exceptionally well on prototypes and it’s a highly anticipated service improvement. I believe that the the current 3-box component is no longer fit for purpose for government services (definitely not for frequently used internal services) and would love to see it updated with something like this: https://github.com/BarryJacobs/react-govuk-datepicker
@stagarz thanks for sharing. Out of interest, do you have auto-tabbing on any other fields, or is it just dates?
And does your auto-tabbing date component prevent accidental double-tabbing in any way (ie if the user presses the tab button at around the same time the auto-tabbing happens)?
It has tested exceptionally well on prototypes and it’s a highly anticipated service improvement. I believe that the the current 3-box component is no longer fit for purpose for government services (definitely not for frequently used internal services) and would love to see it updated with something like this: BarryJacobs/react-govuk-datepicker
@stagarz This feels like a bit of a blanket statement! There are situations in which having a date picker is not a useful or appropriate way to ask for a date, such dates well into the past, such as a date of birth, or inputs that permit a level of vagueness, such as only requiring a month and year.
I personally have some qualms with the example there, though those seem to be inherited from the Scottish Government component. Mainly that there is no explicit mention of what date format to use—it's implied by the hint, but not explicitly stated, which seems more likely to create errors—and the rather unusual disconnect of defaulting to a UK date format whilst the picker uses US calendar formatting.1
USWDS does use a single text input and date picker combination, similar to that example, but found that users of assistive technology often struggled to enter dates correctly: uswds/uswds#5534
I think that, if we were to implement a date picker, we would likely still retain the separate inputs so that each part can be explicitly labelled and keep the ability to provide granular input and validation, as the current component does.
Footnotes
These are issues that have genuinely caused me to input dates incorrectly before, including one time spending the night sleeping in the entrance of Heathrow Terminal 4 because the hotel I'd booked used a US formatted date picker. 🙃 Fun night. ↩
@querkmachine the date picker is optional (and I agree, only useful is certain scenarios).
The format is communicated when the field is empty.
Admittedly, the format would never be an issue for our internal service users. It would be great if this component could be tested in more contexts to see how well it works and/or how it could be iterated (so we can move away from the 3-box component and all its widespread reported issues)
@frankieroberto we don’t use auto-tabbing anywhere and I would argue not even in this date component - as it’s one component and not 3 (tab would take users away from the date component). Keyboard arrows and mouse clicks can help users navigate to the different parts of the date (e.g. to correct the month when entering the year)
I’m not an accessibility expert and the appropriate scrutiny is required to make it watertight (I may have jumped the gun with the “fully accessible” statement above).
Activity
davehaigh commentedon Jul 13, 2018
Consider how some users might be entering a date from reading it off material where it's displayed as letters. e.g. a passport.
so consider allowing various formats for month e.g. 3, 03, MAR and MARCH
in our testing we see users enter months as numbers
manalishi79 commentedon Aug 1, 2018
There used to be documentation with this component explaining a hack to make inputs work as users expected in iOS (specifically activating the numeric keyboard on number inputs). Is this still relevant? I notice it's not in the current page
36degrees commentedon Aug 2, 2018
Hi Paul,
It's still relevant – I believe that guidance was removed because we are now providing code examples, which we were not able to do when this content was in the service manual, and so it was more important to document 'implementation details' like that.
The code examples on the date input all use the
pattern="[0-9]*"attribute, which triggers the keyboard on iOS.charge-valtech commentedon Aug 22, 2018
Testing the "Apply for a Blue Badge" service. We saw two users with Voiceover on iOS run into issues when entering their date of birth. The first user expected it to auto-tab, getting stuck in the day field and then had issues getting back into the month field. The second user wasn't sure of what to do after entering the day, they said “I didn’t hear that one. Do I have to put dot there for month? Oh I have to go, ok. I’ve just done the day, and then” he then tried to find the dot button and gets stuck in the International keyboard, swiping the screen he finds year… swipes the screen until he finds the month input “I just want to go to month”.
Soundman32 commentedon Oct 8, 2018
I don't think the documentation specifically shows how to display a formatted date. It has "31 3 1980" in the examples, but this is not specifically spelt out in date patterns or a-z style guide. One of the reasons this has come up is that in my 30 years of non-government development, I've never come across a date format (anywhere in the world) where spaces are the separator!
jfhector commentedon Oct 23, 2018
Hello all. I'd like to understand why the text input based date picker is more usable / accessible than more a select element, or a calendar. Could you tell me or point me in the right direction?
I remember that there's been usability findings pointing to that direction, but it'd help me to understand what the these findings so I can be convinced myself and convince colleagues. Is there an article / blog post anywhere recapping on this?
(Thanks for the excellent work on the design system and its documentation).
joelanman commentedon Oct 24, 2018
Hi @jfhector that's a good question, you can read some research here:
https://designnotes.blog.gov.uk/2013/12/05/asking-for-a-date-of-birth/
We found similar problems with dropdowns regularly, which is why we generally recommend against them.
In terms of calendar controls, we haven't found a need when it comes to asking for a memorable date (like a date of birth), though it could be useful in other situations. The problem then is, if you use built-in browser calendars the user experience can vary wildly. If you use a custom calendar control you need to make sure it's fully accessible.
jfhector commentedon Oct 24, 2018
Thanks a lot @joelanman @stevenaproctor , really helpful.
joelanman commentedon Oct 25, 2018
@jfhector there is a thread on a possible date picker/calendar control here
jonathaninch commentedon Nov 6, 2018
Have any prototypes / services considered a 'today' option on a date entry screen, so a user can - for example - select a 'today' radio button rather than enter data into the date fields under it? I realise it would often be inappropriate but for some services where a user can cancel / deregister on that particular day it might be helpful?
HughePaul commentedon Feb 7, 2019
is there a way to add attributes to date items, such as maxlength=2 and aria-required=true
36degrees commentedon Feb 8, 2019
This isn't possible using the macros at the minute – this is being tracked as an issue in the GOV.UK Frontend repo – alphagov/govuk-frontend#995.
If you're using the HTML directly, then you can add the attributes as you normally would.
manalishi79 commentedon Feb 12, 2019
While testing this pattern in the design system with Safari and Voiceover, I've noticed that the text inputs offer a number input as an incrementable input (stepper). I can't see how this input format is described in the markup.
65 remaining items
oddjones commentedon Oct 22, 2024
Would be great to be able to add attributes to the fieldset / legend or inputs within the nunjucks macro - I'm using data attributes on the fieldset to tell my application how I'd like to render the output from the component when it gets to summary time - but currently I have to hand-crank the HTML for these components - not a biggie but not difficult to fix either...
Jdoyle286 commentedon Mar 31, 2026
In testing date inputs for a pension-age benefit application, most of our users expected the selection to auto-tab between fields. Because many were not touch typing and were looking at the keyboard, they didn’t notice they had entered the full date (DDMMYYYY) into a single field.
They then found it difficult to correct, especially when the input overflowed the visible field. Some struggled to place the cursor and deleted characters one at a time, which was slow and frustrating.
We know auto-tab should be avoided for accessibility. We were considering using maxlength to limit input, but are aware this risks silent failure if users keep typing.
Has anyone explored this trade-off or found better approaches for pension age customers?
rjmunro commentedon Mar 31, 2026
@Jdoyle286 Maybe if you enter a whole date in the day field then when you tab it could realise and fix it, i.e. move the extra digits to the other fields for you and move the cursor to the next tab position after the date input.
joelanman commentedon Mar 31, 2026
@Jdoyle286 just to double check - are they entering a separator (like / ) or are they just typing DDMMYYYY and expecting autotab? I'm just thinking if they are typing / you could consider tabbing then
frankieroberto commentedon Mar 31, 2026
I’ve seen similar expectations of auto-tabbing after entering 2 digits. However I’ve not yet observed it being unrecoverable, more of a minor annoyance or unmet expectation.
I’ve considered having it auto-tab only when you enter a 3rd digit into the day or month input (and the it’d move that 3rd digit in). Alternatively we could explore auto-tabbing after 2 digits, but with some debouncing to prevent tabbing twice if the user also pressed tab at the same time. Would have to consider any other unexpected side-effects though!
cjforms commentedon Apr 1, 2026
I've seen this a lot, especially with people who need to look at the keyboard as they type.
Agree with @rjmunro - if you get more input in the first field that you expect, could this get distributed to the other fields without hassling the user about it?
stagarz commentedon Apr 9, 2026
We have observed these issues with our internal service users, who also use a plethora of other systems that do not require tabbing (so they need to develop two sets of “muscle memory” and remember to apply the correct one on the correct service).
We have therefore developed a (fully accessible) new date component, which does not require tabbing and users can also paste copied dates into it (often a user need for them). It also has a date picker, which meets a different user need, present in some scenarios.
It has tested exceptionally well on prototypes and it’s a highly anticipated service improvement. I believe that the the current 3-box component is no longer fit for purpose for government services (definitely not for frequently used internal services) and would love to see it updated with something like this:
https://github.com/BarryJacobs/react-govuk-datepicker
frankieroberto commentedon Apr 9, 2026
@stagarz thanks for sharing. Out of interest, do you have auto-tabbing on any other fields, or is it just dates?
And does your auto-tabbing date component prevent accidental double-tabbing in any way (ie if the user presses the tab button at around the same time the auto-tabbing happens)?
querkmachine commentedon Apr 9, 2026
@stagarz This feels like a bit of a blanket statement! There are situations in which having a date picker is not a useful or appropriate way to ask for a date, such dates well into the past, such as a date of birth, or inputs that permit a level of vagueness, such as only requiring a month and year.
I personally have some qualms with the example there, though those seem to be inherited from the Scottish Government component. Mainly that there is no explicit mention of what date format to use—it's implied by the hint, but not explicitly stated, which seems more likely to create errors—and the rather unusual disconnect of defaulting to a UK date format whilst the picker uses US calendar formatting.1
USWDS does use a single text input and date picker combination, similar to that example, but found that users of assistive technology often struggled to enter dates correctly: uswds/uswds#5534
I think that, if we were to implement a date picker, we would likely still retain the separate inputs so that each part can be explicitly labelled and keep the ability to provide granular input and validation, as the current component does.
Footnotes
These are issues that have genuinely caused me to input dates incorrectly before, including one time spending the night sleeping in the entrance of Heathrow Terminal 4 because the hotel I'd booked used a US formatted date picker. 🙃 Fun night. ↩
stagarz commentedon Apr 9, 2026
@querkmachine the date picker is optional (and I agree, only useful is certain scenarios).
The format is communicated when the field is empty.
Admittedly, the format would never be an issue for our internal service users. It would be great if this component could be tested in more contexts to see how well it works and/or how it could be iterated (so we can move away from the 3-box component and all its widespread reported issues)
stagarz commentedon Apr 9, 2026
@frankieroberto we don’t use auto-tabbing anywhere and I would argue not even in this date component - as it’s one component and not 3 (tab would take users away from the date component). Keyboard arrows and mouse clicks can help users navigate to the different parts of the date (e.g. to correct the month when entering the year)
I’m not an accessibility expert and the appropriate scrutiny is required to make it watertight (I may have jumped the gun with the “fully accessible” statement above).