@@ -92,12 +92,12 @@ function export_add_js() {
9292 $ args ['status ' ] = $ _GET ['page_status ' ];
9393 } elseif ( 'attachment ' == $ _GET ['content ' ] ) {
9494 $ args ['content ' ] = 'attachment ' ;
95-
95+
9696 if ( $ _GET ['attachment_start_date ' ] || $ _GET ['attachment_end_date ' ] ) {
9797 $ args ['start_date ' ] = $ _GET ['attachment_start_date ' ];
9898 $ args ['end_date ' ] = $ _GET ['attachment_end_date ' ];
9999 }
100- }
100+ }
101101 else {
102102 $ args ['content ' ] = $ _GET ['content ' ];
103103 }
@@ -160,37 +160,45 @@ function export_date_options( $post_type = 'post' ) {
160160
161161<h2><?php _e ( 'Choose what to export ' ); ?> </h2>
162162<form method="get" id="export-filters">
163+ <fieldset>
164+ <legend class="screen-reader-text"><?php _e ( 'Content to export ' ); ?> </legend>
163165<input type="hidden" name="download" value="true" />
164- <p><label><input type="radio" name="content" value="all" checked="checked" /> <?php _e ( 'All content ' ); ?> </label></p>
165- <p class="description"><?php _e ( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus, and custom posts. ' ); ?> </p>
166+ <p><label><input type="radio" name="content" value="all" checked="checked" aria-describedby="all-content-desc" /> <?php _e ( 'All content ' ); ?> </label></p>
167+ <p class="description" id="all-content-desc" ><?php _e ( 'This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts. ' ); ?> </p>
166168
167169<p><label><input type="radio" name="content" value="posts" /> <?php _e ( 'Posts ' ); ?> </label></p>
168170<ul id="post-filters" class="export-filters">
169171 <li>
170- <label><?php _e ( 'Categories: ' ); ?> </label >
172+ <label><span class="label-responsive"> < ?php _e ( 'Categories: ' ); ?> </span >
171173 <?php wp_dropdown_categories ( array ( 'show_option_all ' => __ ('All ' ) ) ); ?>
174+ </label>
172175 </li>
173176 <li>
174- <label><?php _e ( 'Authors: ' ); ?> </label >
175- <?php
177+ <label><span class="label-responsive"> < ?php _e ( 'Authors: ' ); ?> </span >
178+ <?php
176179 $ authors = $ wpdb ->get_col ( "SELECT DISTINCT post_author FROM {$ wpdb ->posts } WHERE post_type = 'post' " );
177180 wp_dropdown_users ( array ( 'include ' => $ authors , 'name ' => 'post_author ' , 'multi ' => true , 'show_option_all ' => __ ('All ' ) ) );
178- ?>
181+ ?>
182+ </label>
179183 </li>
180184 <li>
181- <label><?php _e ( 'Date range: ' ); ?> </label>
182- <select name="post_start_date">
183- <option value="0"><?php _e ( 'Start Date ' ); ?> </option>
185+ <fieldset>
186+ <legend class="screen-reader-text"><?php _e ( 'Date range: ' ); ?> </legend>
187+ <label for="post-start-date" class="label-responsive"><?php _e ( 'Start date: ' ); ?> </label>
188+ <select name="post_start_date" id="post-start-date">
189+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
184190 <?php export_date_options (); ?>
185191 </select>
186- <select name="post_end_date">
187- <option value="0"><?php _e ( 'End Date ' ); ?> </option>
192+ <label for="post-end-date" class="label-responsive"><?php _e ( 'End date: ' ); ?> </label>
193+ <select name="post_end_date" id="post-end-date">
194+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
188195 <?php export_date_options (); ?>
189196 </select>
197+ </fieldset>
190198 </li>
191199 <li>
192- <label><?php _e ( 'Status: ' ); ?> </label>
193- <select name="post_status">
200+ <label for="post-status" class="label-responsive" ><?php _e ( 'Status: ' ); ?> </label>
201+ <select name="post_status" id="post-status" >
194202 <option value="0"><?php _e ( 'All ' ); ?> </option>
195203 <?php $ post_stati = get_post_stati ( array ( 'internal ' => false ), 'objects ' );
196204 foreach ( $ post_stati as $ status ) : ?>
@@ -203,26 +211,31 @@ function export_date_options( $post_type = 'post' ) {
203211<p><label><input type="radio" name="content" value="pages" /> <?php _e ( 'Pages ' ); ?> </label></p>
204212<ul id="page-filters" class="export-filters">
205213 <li>
206- <label><?php _e ( 'Authors: ' ); ?> </label >
207- <?php
214+ <label><span class="label-responsive"> < ?php _e ( 'Authors: ' ); ?> </span >
215+ <?php
208216 $ authors = $ wpdb ->get_col ( "SELECT DISTINCT post_author FROM {$ wpdb ->posts } WHERE post_type = 'page' " );
209217 wp_dropdown_users ( array ( 'include ' => $ authors , 'name ' => 'page_author ' , 'multi ' => true , 'show_option_all ' => __ ('All ' ) ) );
210- ?>
218+ ?>
219+ </label>
211220 </li>
212221 <li>
213- <label><?php _e ( 'Date range: ' ); ?> </label>
214- <select name="page_start_date">
215- <option value="0"><?php _e ( 'Start Date ' ); ?> </option>
222+ <fieldset>
223+ <legend class="screen-reader-text"><?php _e ( 'Date range: ' ); ?> </legend>
224+ <label for="page-start-date" class="label-responsive"><?php _e ( 'Start date: ' ); ?> </label>
225+ <select name="page_start_date" id="page-start-date">
226+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
216227 <?php export_date_options ( 'page ' ); ?>
217228 </select>
218- <select name="page_end_date">
219- <option value="0"><?php _e ( 'End Date ' ); ?> </option>
229+ <label for="page-end-date" class="label-responsive"><?php _e ( 'End date: ' ); ?> </label>
230+ <select name="page_end_date" id="page-end-date">
231+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
220232 <?php export_date_options ( 'page ' ); ?>
221233 </select>
234+ </fieldset>
222235 </li>
223236 <li>
224- <label><?php _e ( 'Status: ' ); ?> </label>
225- <select name="page_status">
237+ <label for="page-status" class="label-responsive" ><?php _e ( 'Status: ' ); ?> </label>
238+ <select name="page_status" id="page-status" >
226239 <option value="0"><?php _e ( 'All ' ); ?> </option>
227240 <?php foreach ( $ post_stati as $ status ) : ?>
228241 <option value="<?php echo esc_attr ( $ status ->name ); ?> "><?php echo esc_html ( $ status ->label ); ?> </option>
@@ -234,23 +247,30 @@ function export_date_options( $post_type = 'post' ) {
234247<?php foreach ( get_post_types ( array ( '_builtin ' => false , 'can_export ' => true ), 'objects ' ) as $ post_type ) : ?>
235248<p><label><input type="radio" name="content" value="<?php echo esc_attr ( $ post_type ->name ); ?> " /> <?php echo esc_html ( $ post_type ->label ); ?> </label></p>
236249<?php endforeach ; ?>
250+
237251<p><label><input type="radio" name="content" value="attachment" /> <?php _e ( 'Media ' ); ?> </label></p>
238252<ul id="attachment-filters" class="export-filters">
239253 <li>
240- <label><?php _e ( 'Date range: ' ); ?> </label>
241- <select name="attachment_start_date">
242- <option value="0"><?php _e ( 'Start Date ' ); ?> </option>
254+ <fieldset>
255+ <legend class="screen-reader-text"><?php _e ( 'Date range: ' ); ?> </legend>
256+ <label for="attachment-start-date" class="label-responsive"><?php _e ( 'Start date: ' ); ?> </label>
257+ <select name="attachment_start_date" id="attachment-start-date">
258+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
243259 <?php export_date_options ( 'attachment ' ); ?>
244260 </select>
245- <select name="attachment_end_date">
246- <option value="0"><?php _e ( 'End Date ' ); ?> </option>
261+ <label for="attachment-end-date" class="label-responsive"><?php _e ( 'End date: ' ); ?> </label>
262+ <select name="attachment_end_date" id="attachment-end-date">
263+ <option value="0"><?php _e ( '— Select — ' ); ?> </option>
247264 <?php export_date_options ( 'attachment ' ); ?>
248265 </select>
266+ </fieldset>
249267 </li>
250268</ul>
269+
270+ </fieldset>
251271<?php
252272/**
253- * Fires after the export filters form.
273+ * Fires at the end of the export filters form.
254274 *
255275 * @since 3.5.0
256276 */
0 commit comments