Skip to content

Commit

Permalink
Adding date form to date picker and improving accessibility (#7621)
Browse files Browse the repository at this point in the history
* Date form has been added to the date-time component, as a primary input method
* Locale-dependent field order, with en-US being month-day, and the default day-month
* Keyboard focus goes to the month selector first, as dates are validated based on the month (and year if leap-year)
* The post-schedule sidebar widget is now more accessible, with button designated as a live object, so changes should be announced to date pickers
* React-Datepicker widget has been removed from the keyboard navigation and screenreader context, as the new form fields are not the primary input method.
* Tiny bit of code cleanup
  • Loading branch information
aldavigdis authored and tofumatt committed Oct 13, 2018
1 parent c22ec87 commit 00b9063
Show file tree
Hide file tree
Showing 15 changed files with 909 additions and 265 deletions.
7 changes: 4 additions & 3 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ function gutenberg_register_scripts_and_styles() {
),
),
'formats' => array(
'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ),
'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),
'datetime' => __( 'F j, Y g:i a', 'default' ),
'time' => get_option( 'time_format', __( 'g:i a', 'default' ) ),
'date' => get_option( 'date_format', __( 'F j, Y', 'default' ) ),
'datetime' => __( 'F j, Y g:i a', 'default' ),
'datetimeAbbreviated' => __( 'M j, Y g:i a', 'default' ),
),
'timezone' => array(
'offset' => get_option( 'gmt_offset', 0 ),
Expand Down
Loading

0 comments on commit 00b9063

Please sign in to comment.