• Hi,
    Thank’s for the great plugin!
    I want to ask for an option to disable or change the text “Search input” on mouse hover in the search box.

    Thank you in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    Do you mean the placeholder text in the input field?

    I’m not sure if I can add an option for that, but with a custom script it should be possible.

    Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_action('wp_footer', 'asl_footer_change_placeholder');
    function asl_footer_change_placeholder(){
        ?>
        <script>
        jQuery(function($){
            $('input.orig').one('hover', function(){
                $(this).attr('placeholder', '');
            });
        });
        </script>
        <?php
    }
    Thread Starter NewsArena

    (@newsarena)

    Thank’s, but another thing I meant. When you hover over input field, there is a popup “Search input”. That’s what I want to change.

    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    There is no such feature in this plugin, so it is most likely something else causing this behavior.

    Best,
    Ernest M.

    Thread Starter NewsArena

    (@newsarena)

    You can view it even on your demo page: https://wp-dreams.com/demo/ajax-search-lite/

    Screenshot

    Plugin Author wpdreams

    (@wpdreams)

    I think that is going to be some sort of browser extension (perhaps some sort of dev tool or accessibility too), because I can’t see that on any browser on my end. Could you please check it without extensions enabled?

    Thread Starter NewsArena

    (@newsarena)

    I have tried with all major browsers and the result is the same: Mozilla Firefox, IE, Google Chrome.

    Thread Starter NewsArena

    (@newsarena)

    <input title="Search input" class="orig" name="phrase" placeholder="Търси в сайта.." value="" autocomplete="off" type="search">

    I found this from browser’s DOM and Style Inspector.

    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    I just tried the same browsers on 3 different computers, 2 laptops, 1 PC and 3 mobile devices, but no sign of that icon anywhere.

    I have also tried browserstack for a virtualized Mac Safari just to make sure, no sign either: https://i.imgur.com/0Riu1Gr.jpg

    I feel like this is some sort of visual accessibility button, if the browser change did not help, then it is likely enabled somewhere in the operating system, otherwise I have no clue.

    Thread Starter NewsArena

    (@newsarena)

    I found it. It’s in includes/views/asl.shortcode.php file.

    <div class='proinput'>
            <form autocomplete="off" title='Ajax serch form'>
                <input title='Search input' type='search' class='orig' name='phrase' placeholder='<?php echo asl_icl_t( "Search bar placeholder text", w_isset_def($style['defaultsearchtext'], '') ); ?>' value='<?php echo apply_filters('asl_print_search_query', get_search_query()); ?>' autocomplete="off"/>
                <input title='Autocomplete input, do not use this' type='text' class='autocomplete' name='phrase' value='' autocomplete="off"/>
                <span class='loading'></span>
                <input type='submit' value="Start search" style='width:0; height: 0; visibility: hidden;'>
            </form>
        </div>

    You have to delete/edit title=’Search input’ and title=’Ajax serch form’ to fix it.
    Can I suggest we can modify this in plugin options for future release?

    Thanks.

    • This reply was modified 6 years, 10 months ago by NewsArena.
    Plugin Author wpdreams

    (@wpdreams)

    Hi,

    I cannot remove the title tags from those unfortunately. Title tags are not visual elements, they are not printed as elements by the browser, they are used by accessibility tools. It is recommended method by W3 and webaim, for visually impaired users.

    Even Google search uses a title tag on the search input for the same purpose, you can check it on the source on google.com. This is google search soruce, with title tag: https://i.imgur.com/PNw0FPL.png

    You might some sort of accessibility feature enabled in your operating system, because I honestly cannot replicate the issue, I have tried many devices by now, as well as there are no other reports of this problem.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Search input text’ is closed to new replies.