Title: get_search_form &#8211; invalid HTML generated &#8211; Screen Reader issue
Last modified: August 24, 2016

---

# get_search_form – invalid HTML generated – Screen Reader issue

 *  [DaveWP196](https://wordpress.org/support/users/davewp196/)
 * (@davewp196)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/get_search_form-invalid-html-generated-screen-reader-issue/)
 * The code on lines 235-239 need to be changed as the <label> element is closed
   prior to the <input> statement
 *     ```
       <div>
       					<label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
       					<input type="text" value="' . get_search_query() . '" name="s" id="s" />
       					<input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
       				</div>
       ```
   
 * Should be changed to
 *     ```
       <div>
       					<label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '
       					<input type="text" value="' . get_search_query() . '" name="s" id="s" /></label>
       					<input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
       				</div>
       ```
   

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [11 years, 1 month ago](https://wordpress.org/support/topic/get_search_form-invalid-html-generated-screen-reader-issue/#post-6061596)
 * Hi DaveWP196 have you considered posting a patch? 😉
 * [https://core.trac.wordpress.org/](https://core.trac.wordpress.org/)
 * Accessibility is important, I think it’s more valuable than worrying about supporting
   old versions of web browsers. If you submit a patch and it get’s accepted then
   you’ll be helping a lot of other users.

Viewing 1 replies (of 1 total)

The topic ‘get_search_form – invalid HTML generated – Screen Reader issue’ is closed
to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/get_search_form-invalid-html-generated-screen-reader-issue/#post-6061596)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
