Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Contact Form: make the (YYYY-DD-MM) text on date label optional #36429

Open foleynotrose opened 7 months ago

foleynotrose commented 7 months ago

Impacted plugin

Jetpack

What

Make it possible to remove the YYYY-DD-MM as part of the date field label in Jetpack forms

How

User requesting that this part of the label be optional.

https://wordpress.org/support/topic/how-to-remove-date-pattern-text-from-label-of-date-fields/

jeherve commented 7 months ago

@monsieur-z Could you take a look at this, since you worked on #34743?

Thank you!

monsieur-z commented 7 months ago

To give some context, this addition was part of an initiative to improve the accessibility of the Contact Form block (pf5801-87-p2).

The calendar widget that opens when the date field receives focus isn't usable with a keyboard. We must then provide keyboard-only users with a way to fill this field. When we don't rely on the calendar widget, showing the date format prevents confusion (and allows site owners to have consistent data). I don't recommend we remove it.

We could, however, explore different visual treatments (note that the date format shouldn't be set as the input placeholder, as the placeholder disappears when a user starts to type)

To address some of the comments directly:

This is not necessary, it pollutes the form.

On the contrary, it helps keyboard users understand how to fill the field.

If we wish to display an example of how to fill in the field, we type this into the label ourselves.

In this instance, because the calendar widget isn't usable with a keyboard, I believe it should be baked in.

github-actions[bot] commented 1 month ago

This issue has been marked as stale. This happened because:

No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.