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

Closed
mirka opened this issue Apr 26, 2024 · 10 comments · Fixed by #64800
Closed

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

mirka opened this issue Apr 26, 2024 · 10 comments · Fixed by #64800
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
@patil-vipul
Copy link

Raised a PR for this issue here #61562
@mirka @jasmussen

@MadGanGithub
Copy link

Hey @mirka, If this issue is open, I would like to work on this

@mirka
Copy link
Member Author

mirka commented Jun 25, 2024

@MadGanGithub It seems like @patil-vipul abandoned the PR (?), so please feel free to submit a new PR.

@patil-vipul
Copy link

@mirka I'll be pushing new PR with same changes, as the previous PR got messed up.

@ciampo
Copy link
Contributor

ciampo commented Jul 10, 2024

The previous attempt #61562 was closed without merging — @MadGanGithub would you be up for working on it?

@mirka
Copy link
Member Author

mirka commented Aug 20, 2024

We need to land this in the next month or two for this to be included in WP 6.7. Do we still have any takers to work on this?

@ciampo
Copy link
Contributor

ciampo commented Aug 26, 2024

Since it's been a while and no one unfortunately volunteered, here is a PR closing this issue #64800

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
6 participants