Add screen reader labels to the date inputs on the post editing screen. Fixes #25461. Props frank-klein.
git-svn-id: https://develop.svn.wordpress.org/trunk@28730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
121726df31
commit
827cf97b00
@ -733,7 +733,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
|||||||
$cur_hh = gmdate( 'H', $time_adj );
|
$cur_hh = gmdate( 'H', $time_adj );
|
||||||
$cur_mn = gmdate( 'i', $time_adj );
|
$cur_mn = gmdate( 'i', $time_adj );
|
||||||
|
|
||||||
$month = "<select " . ( $multi ? '' : 'id="mm" ' ) . "name=\"mm\"$tab_index_attribute>\n";
|
$month = '<label for="mm" class="screen-reader-text">' . __( 'Month' ) . '</label><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
|
||||||
for ( $i = 1; $i < 13; $i = $i +1 ) {
|
for ( $i = 1; $i < 13; $i = $i +1 ) {
|
||||||
$monthnum = zeroise($i, 2);
|
$monthnum = zeroise($i, 2);
|
||||||
$month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $mm, false ) . '>';
|
$month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $mm, false ) . '>';
|
||||||
@ -742,10 +742,10 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
|||||||
}
|
}
|
||||||
$month .= '</select>';
|
$month .= '</select>';
|
||||||
|
|
||||||
$day = '<input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
$day = '<label for="jj" class="screen-reader-text">' . __( 'Day' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="jj" ' ) . 'name="jj" value="' . $jj . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||||
$year = '<input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
|
$year = '<label for="aa" class="screen-reader-text">' . __( 'Year' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="aa" ' ) . 'name="aa" value="' . $aa . '" size="4" maxlength="4"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||||
$hour = '<input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
$hour = '<label for="hh" class="screen-reader-text">' . __( 'Hour' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="hh" ' ) . 'name="hh" value="' . $hh . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||||
$minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
$minute = '<label for="mn" class="screen-reader-text">' . __( 'Minute' ) . '</label><input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />';
|
||||||
|
|
||||||
echo '<div class="timestamp-wrap">';
|
echo '<div class="timestamp-wrap">';
|
||||||
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
||||||
|
Loading…
Reference in New Issue
Block a user