How do I add a 'Title' and 'Label How do I add 'Title' to a search Engine? For Section 508 compliance i need to add 'label or 'title' to the following section :

&lt;input placeholder="Search" type="text" id="edit-search-api-views-fulltext" name="search_api_views_fulltext" value="" size="26" maxlength="128" class="form-text" /&gt;


I have created funtion.js with the following query:

$(document).ready(function(){

            $('#edit-search-api-views-fulltext').attr('title', 'Search');}


This doesn't seem to be working. View source says:

&lt;div id="edit-search-api-views-fulltext-wrapper" class="views-exposed-widget views-widget-filter-search_api_views_fulltext"&gt;
                        &lt;div class="views-widget"&gt;
          &lt;div class="form-item form-type-textfield form-item-search-api-views-fulltext"&gt;
 &lt;input placeholder="Search" type="text" id="edit-search-api-views-fulltext" name="search_api_views_fulltext" value="" size="26" maxlength="128" class="form-text" /&gt;
&lt;/div&gt;


How do I add a Title?
I think you can better do this with hook_form_alter. Like this:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'views_exposed_form') {
    $view = $form_state['view'];
    if ($view-&gt;name == 'my_view_machine_name' &amp;&amp; $view-&gt;current_display == 'display_name') {
      // alter your exposed form here
    }
  }
}


If you do a var_dump (or dpm if you use devel) on $form, you can easily find out which values to alter.