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

DatePicker: Date formatting symbols appear in aria-label #41384

Open
noisysocks opened this issue May 27, 2022 · 1 comment
Open

DatePicker: Date formatting symbols appear in aria-label #41384

noisysocks opened this issue May 27, 2022 · 1 comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@noisysocks
Copy link
Member

I noticed that the aria-label on the day component outputs symbols.

Screen Shot 2022-05-27 at 11 17 15 am

Not sure if the problem is in moment(). It's something to do with the locale aware format LL

This works

const ARIAL_LABEL_TIME_FORMAT = 'dddd, MMMM DD, YYYY'; // Monday, May 09, 2022

But it's not locale aware I presume so it might need some further 👀

Originally posted by @ramonjd in #41097 (comment)

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended [Package] Components /packages/components labels May 27, 2022
@noisysocks
Copy link
Member Author

We probably should use our own dateFormat function that's in @wordpress/date here:

const dayAriaLabel = moment( day ).format( ARIAL_LABEL_TIME_FORMAT );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant