-
Notifications
You must be signed in to change notification settings - Fork 12
Offer a DD-MM-YY date field input feature and documentation #436
Comments
Hi there @Jane24. (: There has been a recent exemplar that implemented a _birth_date capture field. We intend to take this pattern and provide it within UI-Kit. This will be another few sprints off, as we’re currently swarming on releasing a new version of our guidance/documentation (the design guide). From what I recall there were another few exemplars earlier in the year, prior to the existence of UI-Kit, that implemented a variety of other date entry/selection patterns. Off the back of my head, these included selecting a calendar date in the future and to selecting a day and timeslot for an appointment — there might also be others that have user testing behind them for us to pull from.
Could you elaborate on this? (: Thanks for raising this issue. Related issues |
Hi there Regarding the auto-tab: we currently use set of 3 fields to capture the dates, as in the GOV UK example. Auto tabbing works if the user enters 2 numbers for the Date and Month fields - the field focus automatically moves to the next field in the set of 3. But users won't necessarily enter 09, for example, and shouldn't need to. If there's a mix of auto tab and manual tab it's confusing for users. Prob better to just drop the auto tab for this set of fields. Is that how it's been implemented for the exemplar? |
Ah, gotcha — of course! Thanks for elaborating.
In the recent exemplar (which was in alpha, and a low-fidelity prototype), I don’t believe there was any Javascript implementation that would auto-tab when 2 numbers we entered, but when we add this as a form pattern in UI-Kit we very much should also provide this functionality. |
Dates are about the only field that I'd consider auto-tabbing for. Just found a reasonable solution. Example: Month, inserted 13, (outside possible range), background turns red, and will not jump to next field. Month, inserted 4, will not jump because does not fill the input (2 digits). User has to tab themselves. |
nod My only concern in tabbing is an accessibility concern — I need to do some testing to ensure that any JS-powered auto-tabbing and focus to the next input field (from DD to MM to YY; stop) also hits the |
Yes, You're right. I'd go back to my initial comment that there should be no auto tabbing between fields. |
Thanks again for opening this. I think adding the auto-tabbing would be a rather nice feature, if we can ensure we don’t screw over screen readers. I’m not sure when we will get the chance to get onto this, but it’s definitely in our backlog now. Edit: I also renamed the issue — let me know if it’s not representative of what you meant? :) |
A lurker adding in thoughts regarding A11y: Moving a users focus is considered to be a change of context. And shouldn't be done when:
The described setting of d-m-Y values in seperate date fields would be an example of 2. So it should be okay to do provided there's some words telling users that it's going to happen before the fields (and if you don't mind sacrificing the design to include these words). This relates to the G13 technique on the WCAG website, for further thrilling reading. |
Thanks @Chris820 — spot on. |
Feature Request - Add Date field example
Would be great for the UI kit to include an example of how to capture a date in our forms. GOV.UK has an example that we could use.
We want to note that there is no auto-tab between fields.
http://govuk-elements.herokuapp.com/form-elements/example-date/
The text was updated successfully, but these errors were encountered: