Skip to content
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

[a11y]: Date picker examples and Figma assets rely on a placeholder or inconsistent date masks #11805

Open
2 tasks done
mbgower opened this issue Jul 14, 2022 · 5 comments
Open
2 tasks done

Comments

@mbgower
Copy link

mbgower commented Jul 14, 2022

Package

@carbon/react

Browser

Chrome

Operating System

MacOS

Package version

https://carbondesignsystem.com/components/date-picker/usage

React version

https://carbondesignsystem.com/components/date-picker/usage

Automated testing tool and ruleset

n/a

Assistive technology

No response

Description

Carbon has some clearly stated requirement in the Usage material for Date picker, as follows:

Screenshot 2022-07-14 at 9 59 45 AM

Despite this, Carbon's illustrations for date picker seem to default to using only the placeholder text for date mask info. Date masks as placeholders -- or other variants -- appear through the Usage and Style info in Carbon's documentation:

image

^ In the Live demo

image

^ In examples

image

^ On the style page

image

^ In the Date input specs

image

^ In the size specs

image

^in the React storybook

In Figma, every example shows it without it part of the label or helper text
image


Where Carbon does show a mask, it tends to be inconsistent:
image
In a different position, in the States material

image

^ In a different position (and format) on the Light variant example ---

Note that in the quoted text at the top, Carbon also says:

When using calendar picker the date format will be automated if the user selects from the calendar menu.

This implies it is okay to have the mask in the placeholder here, but it's not really valid. First, at the moment the ONLY way for a keyboard user to easily changed date and month is to manually enter a date; so the date mask remains a problem) even where the calendar is offered.
Second, there are two very widespread and contradictory ways of showing month/day combinations (MM/DD/YYYY and DD/MM/YYYY).

Is 7/8/2022 the seventh of August or the eighth of July? Without the mask, users cannot tell, so half your audience is going to be wrong in their assumption.

Outside the confusion for anyone trying to interpret a date once the placeholder date mask info has been replaced by an actual date, the placeholder causes several challenges specific to accessibility:

  1. The placeholder text has very low contrast, and may be difficult to read by anyone with low vision
  2. The placeholder text is not surfaced consistently by screen readers and other ATs.

Carbon needs to have a consistent default presentation of date mask which is adopted across its prototyping tools, coding repos and documentation.


Note, this and #11800 have been separated from less critical date picker considerations/issues because they directly affect the accessibility guidance that can be crafted. As such, they constitute higher priority considerations.

WCAG 2.1 Violation

No response

Reproduction/example

https://carbondesignsystem.com/components/date-picker/usage

Steps to reproduce

Go to the Figma library, react repo or Carbon documentation site and look.

Code of Conduct

@mbgower mbgower changed the title [a11y]: Date picker examples and Figma assets all rely on a placeholder date mask [a11y]: Date picker examples and Figma assets rely on a placeholder or inconsistent date masks Jul 14, 2022
@jnm2377
Copy link
Contributor

jnm2377 commented Jul 15, 2022

I think what we can do to address this is:

  1. update our storybook example to have helperText for simple datepickers
  2. make the helperText prop default value be the date format for type="simple" date pickers

@mbgower
Copy link
Author

mbgower commented Jul 15, 2022

@jnm2377 those two technical changes will definitely help.
As discussed, there are also design considerations here, which I'm hoping @laurenmrice and @aagonzales can lead, to do with both the visual examples in Carbon documentation, and the prototyping assets in Figma and Sketch.

@mbgower
Copy link
Author

mbgower commented Jul 15, 2022

My recommendation would be to have the default version of all date pickers have the date mask present in the Helper text by default. This will arguably improve the experience for many users.

As discussed in the Date picker usage.pdf, I'm not certain how/if the OS-level date preferences affect anything in Carbon (i.e., if I have my system set to dd/mm/yyyy, does the browser inherit this and alter Carbon's default of mm/dd/yyyy?). The technical details should be considered as part of this decision.

@mbgower
Copy link
Author

mbgower commented Feb 24, 2023

@sstrubberg I see you folks have put it in the Design System backlog. I agree this is pretty much a design issue. Hopefully @laurenmrice and team will review this.

@sstrubberg sstrubberg added this to the 2023 Q2 milestone Mar 2, 2023
@tay1orjones tay1orjones modified the milestones: 2023 Q2, 2023 Q3 Jul 10, 2023
@sstrubberg sstrubberg added role: design ✏️ and removed package: react carbon-components-react package: @carbon/react @carbon/react labels Aug 1, 2023
@aagonzales
Copy link
Member

Design task:

  • Turn on helper text for all default date inputs

@sstrubberg sstrubberg modified the milestones: 2023 Q3, 2023 Q4 Sep 19, 2023
@sstrubberg sstrubberg removed this from the 2023 Q4 milestone Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

5 participants