wpaccessibility / settings-api-enhanced

An improved WordPress Settings API with default render callbacks and a new accessible layout.
9 stars 0 forks source link

Date Format and Time Format: review the JavaScript part #1

Open afercia opened 7 years ago

afercia commented 7 years ago

In General Settings, Date Format and Time Format have a "Custom" radio button followed by a text field to enter a custom format. When using a keyboard or screen reader, when the text input field gets focused the related radio button gets selected.

Tabbing is the only way keyboard users and screen reader users have to navigate through a form, so they will very likely focus the text field but that doesn't mean they want to enter a custom format. They're just navigating the form.

To reproduce the worst scenario:

Worth considering to fix this in core whether or not the Settings Api Enhanced will get merged.

rianrietveld commented 7 years ago

Maybe we could have a last radio button called Custom format. And below that an empty input field where the date format can be entered? Same for time. And maybe JS toggle that field, so it's only displayed when the custom Format radio button is checked. date-format-input-field