[wp-trac] [WordPress Trac] #55431: add_theme_support for html5 on search-form not working

WordPress Trac noreply at wordpress.org
Wed Mar 23 20:10:39 UTC 2022


#55431: add_theme_support for html5 on search-form not working
---------------------------+----------------------
 Reporter:  blackawxs      |       Owner:  (none)
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:  invalid
 Keywords:                 |     Focuses:
---------------------------+----------------------
Changes (by costdev):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Hi @blackawxs, thanks for opening this ticket!

 @joyously is correct. See the results in different scenarios below.


 With `searchform.php` and without `html5: search-form` theme support:
 {{{#!php
 <form role="search" method="get" class="search-form"
 action="http://localhost/wordpress-develop/src/">
         <label for="search-form-1">Search…</label>
         <input type="search" id="search-form-1" class="search-field"
 value="" name="s">
         <input type="submit" class="search-submit" value="Search">
 </form>
 }}}

 With `searchform.php` and with `html5: search-form` theme support:
 {{{#!php
 <form role="search" method="get" class="search-form"
 action="http://localhost/wordpress-develop/src/">
         <label for="search-form-1">Search…</label>
         <input type="search" id="search-form-1" class="search-field"
 value="" name="s">
         <input type="submit" class="search-submit" value="Search">
 </form>
 }}}

 Without `searchform.php` and without `html5: search-form` theme support:
 {{{#!php
 <form role="search" method="get" id="searchform" class="searchform"
 action="http://localhost/wordpress-develop/src/">
         <div>
                 <label class="screen-reader-text" for="s">Search
 for:</label>
                 <input type="text" value="" name="s" id="s">
                 <input type="submit" id="searchsubmit" value="Search">
         </div>
 </form>
 }}}

 Without `searchform.php` and with `html5: search-form` theme support:
 {{{#!php
 <form role="search" method="get" class="search-form"
 action="http://localhost/wordpress-develop/src/">
         <label>
                 <span class="screen-reader-text">Search for:</span>
                 <input type="search" class="search-field"
 placeholder="Search …" value="" name="s">
         </label>
         <input type="submit" class="search-submit" value="Search">
 </form>
 }}}

 As this is the expected behaviour, I'll close this ticket.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55431#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list