-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify 'Date Input' error messages #868
Comments
After a team discussion we agreed that all fields should be highlighted by default. Highlighting single fields only is optional - a single field should only be highlighted if we can be 100% sure that that is where the user needs to fix the error. |
I've had a go at summarising how we'd want to handle errors in the date input for different scenarios. What do you think @joelanman @christopherthomasdesign? /// Scenario #1: required day, month or year field is missing Scenario #2: one of day, month or year field is impossible Scenario #3: more than one of day, month or year field is impossible Scenario #4: date is in the past when it should be in the future, or vice versa Scenario #5: date doesn’t meet other requirements (eg it’s inconsistent with another date the user has entered, or the service needs the date to fall within a particular range) Choosing which error message to show Highlight one validation problem at a time. If there’s more than one validation problem, show the highest priority one. Priority order is:
|
I'm not sure we could always confidently say which field has the error? For example if someone enters '31 / 2 / 2020'. It could be the day or the month field that is wrong. In that instance I guess we'd go for Scenario 3? |
yeh thats an interesting one, I agree it fits best in scenario 3, which we could slightly expand to with 'the date as a whole is impossible (for example 31 feb)' |
Thanks - I've added something covering that. PR should be ready for approval now: #1155 |
Thanks @StephenGill Coincidentally, we recently worked on this so I'm delighted it's being discussed here. Dates are so common and have multiple failure modes. The burden on users with accessible needs is higher than for other users so it's worth the effort to try and be specific with the error message. Your comment of 7 Feb is almost identical to what we did but we added:
|
Thanks @terrysimpson99 - is there a reason you went for 'Date must have a [month] that is a number' and 'Date must have a [day] that is a number between 1 and [31]' Rather than - '[Month] must be a number' and '[Day] must be a number between 1 and [31]' ? |
@StephenGill The reason is lost in the paraphrasing that I did. We don't say 'Date...' we actually say 'Effective date...' in the service. For example 'Effective date must have a month that is a number'. This follows the pattern at I presume the guidance is written so it works the same regardless of how many things/dates are on the page. If there's only one thing/date on the page then it could work. If it can be endorsed for accessibility then I'm fine with either format. |
What
Raised by a user at DWP
While we have a good understanding of when to highlight individual fields (for example when a month is a number greater than 12, or we know there cannot be a 31st of February) the example of "date in the future" has an example of just the year being highlighted, and also an example of all 3 inputs being highlighted.
We need to clarify what the example would be in this scenario.
Who needs to be involved in this
Devs, Stephen, Mark
The text was updated successfully, but these errors were encountered: