Community

How would I go about removing the element-invisible class from the h2 element?

Re: Bartik theme

How would I go about removing the element-invisible class from the h2 element?

The source code for the Search form is as follows:

<form accept-charset="UTF-8" id="search-block-form" method="post" action="/node"><div><div class="container-inline">
      <h2 class="element-invisible">Search form</h2>
    <div class="form-item form-type-textfield form-item-search-block-form">
  <label for="edit-search-block-form--2" class="element-invisible">Search </label>
<input type="text" class="form-text" maxlength="128" size="15" value="" name="search_block_form" id="edit-search-block-form--2" title="Enter the terms you wish to search for.">
</div>
<div id="edit-actions" class="form-actions form-wrapper"><input type="submit" class="form-submit" value="Search" name="op" id="edit-submit"></div><input type="hidden" value="form-lUOxlXQkLmo7_-8gubnhTureiZByWixMGyptsfDAln0" name="form_build_id">
<input type="hidden" value="fSRUKGMO5orfc9Z_VV8Tgqad0yV3Yfu5PuCXGqBObD8" name="form_token">
<input type="hidden" value="search_block_form" name="form_id">
</div>
</div></form>

Comments

=-=

likely a hook form alter in a custom module or a preprocess function

You generally shouldn't

You generally shouldn't remove these elements. They are there for screen readers (which are used by blind people) to make your site accessible (to blind people). Removing these elements will only cut these users off, and in some countries with some industries that's actually illegal. Or at least, there are legal issues that go along with it.

Since they are hidden elements, they shouldn't be causing you any troubles.

Jaypan We build websites

I was going to unhide it

I was going to unhide it though...

Sorry, I misread your

Sorry, I misread your original post. I thought you wanted to remove the element, I didn't realize you just wanted to remove the class. In that case, you can remove that class in search-block-form.tpl.php.

Jaypan We build websites

Thanks for that. The

Thanks for that.

The search-block-form.tpl.php is in the search core module.
I copied the file and pasted it in the search folder I created in my sites/all/modules folder.
I then removed the element, but the change isn't being reflected. What am I missing?
Am I doing this all wrong?

You need to put the copy of

You need to put the copy of the file in your theme directory, not your modules directly. And not in the 'themes' directory, but in your actual theme directory.

Jaypan We build websites

Thank you so much! It worked!

Thank you so much! It worked!

nobody click here