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

DateTimePicker: AM/PM switcher is not screen reader accessible #61163

Open
mirka opened this issue Apr 26, 2024 · 3 comments
Open

DateTimePicker: AM/PM switcher is not screen reader accessible #61163

mirka opened this issue Apr 26, 2024 · 3 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@mirka
Copy link
Member

mirka commented Apr 26, 2024

What problem does this address?

The AM/PM toggle that appears when is12Hour={ true } only expresses state through visual styling, and cannot be distinguished by screen readers.

AM/PM switcher

What is your proposed solution?

A similarly styled component, RadioGroup, is already deprecated in favor of ToggleGroupControl. Since we don't really use this UI pattern anymore, can we just replace it with a ToggleGroupControl? @WordPress/gutenberg-design

@mirka mirka added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Components /packages/components labels Apr 26, 2024
@jasmussen
Copy link
Contributor

ToggleGroupControl seems perfect for this case. Would the compact size prop work there? Not a blocker, but can likely be useful in this context.

@jameskoster
Copy link
Contributor

Probably a dumb question and/or rabbit hole, but does this need to be a separate control? Curious whether the time input could use a combobox pattern. This would allow you to select am/pm at the same time you choose the hour, and enable selection-by-mouse.

time

@mirka
Copy link
Member Author

mirka commented May 7, 2024

does this need to be a separate control?

Good point, I see how this can be enhanced to use a ComboboxControl. We can do a quick accessibility fix now by using a ToggleGroupControl for the AM/PM toggle, and once we have a rewritten ComboboxControlV2 it might be worth enhancing the inputs.

@mirka mirka added Good First Issue An issue that's suitable for someone looking to contribute for the first time and removed Needs Design Feedback Needs general design feedback. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants