Remove Mobile Search Form – WCAG 2.0 (Level AA)

Home Forums Monument Valley Remove Mobile Search Form – WCAG 2.0 (Level AA)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21563
    Collabo
    Participant

    Remove Mobile Search Form – WCAG 2.0 (Level AA)

    Resolved

    Hey there! Have you noticed this support service is provided FREE of charge?
    If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you

    Consider a donation →

    Hello,
    We have a test site up at http://greenpods.ca/ and when checking the site with achecker.ca, we receive an issue with the mobile menu search form. Is there an easy way to remove this form completely from the theme? Otherwise, adding an id to the input and for=”” to the label will also help remove this issue.

    Please let us know where to make these changes. I found the search form in the class-menu.php, but didn’t want to play with code until I heard back from you.

    Thank you.

    #21565
    Oliver Juhas
    Keymaster

    Hi Collabo,

    First, congrats on building such a beautiful website with Monument Valley! :)

    Please note the search form code is coming directly from WordPress. Also, it is actually not really an accessibility issue as the label is set implicitly in the form. Only AChecker can not determine this properly. You can read more about the issue (with possible solution if really needed) in a knowledge base article on how to test for accessibility.

    Tip: Just a side note, please never edit theme files directly. If you need to modify the theme code, use a child theme instead.

    Best regards,

    Oliver Juhas
    WebMan Design

    #21568
    Collabo
    Participant

    Thank you. Yes, I have seen a similar response regarding the search form in another post.

    What is the easiest way to remove this search function altogether?

    #21569
    Oliver Juhas
    Keymaster

    Hi Collabo,

    Using simple custom CSS will hide the search form and will render it inaccessible:

    .mobile-search-form {
    	display: none;
    }

    However, I’m not sure if this would be sufficient for AChecker if that really is a big concern here.

    If this is not enough, you can remove the functionality from the theme via your child theme‘s functions.php file:

    function child_theme_setup() {
    	remove_filter( 'wp_nav_menu', 'Monument_Valley_Menu::mobile_menu_search', 20, 2 );
    }
    add_action( 'after_setup_theme', 'child_theme_setup', 100 );

    Best regards,

    Oliver Juhas
    WebMan Design

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.