0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Alt for search button

    • BhattaS's Avatar
    • BhattaS
    • Rocketeer
    • Posts: 94
    • Thanks: 0

    Alt for search button

    Posted 13 years 6 months ago
    • I will like to put alt on the search image. You know how you can have image instead of button in the search . I will like to put an alt for accessibility reasons....

      Here is an example

      jobfutures.dev.energetica.com.au/

      In the top hand corner, you will notice the image GO. I will like to put an alt there if possible?
    • Thank you
      Sincerely
      Swagato Bhatta
    • BhattaS's Avatar
    • BhattaS
    • Rocketeer
    • Posts: 94
    • Thanks: 0

    Re: Alt for search button

    Posted 13 years 6 months ago
    • This is basically to make site more accessible
    • Thank you
      Sincerely
      Swagato Bhatta
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: Alt for search button

    Posted 13 years 6 months ago
    • Not sure if we can do soemthing about it. Is it Joomla-core-search? It's not RokAjaxSearch.
    • BhattaS's Avatar
    • BhattaS
    • Rocketeer
    • Posts: 94
    • Thanks: 0

    Re: Alt for search button

    Posted 13 years 6 months ago
    • Yes it is Joomla-core-search
    • Thank you
      Sincerely
      Swagato Bhatta
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29363
    • Thanks: 956
    • Volunteer

    Re: Alt for search button

    Posted 13 years 6 months ago
    • Instead of an override (wich is almost the same) I will show how you can do that with an "Alternative layout" (wich is new in Joomla 1.7 ...

      1.in the html-folder of your template create a folder
      mod_search

      2. copy this file
      your-joomla-root/modules/mod_search/tmpl/default.php
      into this new folder and rename it to mysearch.php
      your-joomla-root/templates/rt_gantry/html/mod_search/mysearch.php

      3. open mysearch.php and find
      $button = '<input type="image" value="'.$button_text.'" class="button'.$moduleclass_sfx.'" src="'.$img.'" onclick="this.form.searchword.focus();"/>';

      and change it to

      $button = '<input type="image" value="'.$button_text.'" alt="my text" class="button'.$moduleclass_sfx.'" src="'.$img.'" onclick="this.form.searchword.focus();"/>';

      change alt="my text" to want you want
      and save that.

      4. open your mod_search module in module-manager.
      On the right side in Advanced Options you can find "Alternative Layout".
      Choose the new "mysearch"-layout and save that.

      5. That's it :-)
    • BhattaS's Avatar
    • BhattaS
    • Rocketeer
    • Posts: 94
    • Thanks: 0

    Re: Alt for search button

    Posted 13 years 6 months ago
    • Thank you so much :)
    • Thank you
      Sincerely
      Swagato Bhatta

Time to create page: 0.092 seconds