1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Divi Ultimate Plugin is displaying a duplicate role="search" field.

Discussion in 'Basic Support Forum' started by Gary Gordon, May 10, 2020.

  1. Gary Gordon

    Gary Gordon Member
    Pro Member

    I am using SmartCrawl Pro (from WPMUDEV) and it detected Duplicate Aria Landmarks saying "We've detected duplicate aria landmarks on your homepage." for Duplicate Landmarks .. for "search".

    After deactivating and activating my plugins back in, I found that this issue was being caused by the Divi Ultimate Plugin.

    Here's the portion that is displayed as part of the DIVI (core theme) from Elegant Themes:

    <div class="et_search_outer">
    <div class="container et_search_form_container">
    <form role="search" method="get" class="et-search-form" action="https://www.wpbns.com/">
    <input type="search" class="et-search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" /> </form>
    <span class="et_close_search_field"></span>
    </div>
    </div>

    But on my home page (https://www.wpbns.com) when I have Divi Ultimate Plugin activated, it also displays this information in the source code:

    <div class="free-search-outer">
    <form role="search" method="get" class="et-search-form" action="https://www.wpbns.com/"><input type="search" class="et-search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" />
    </form>
    <span class="free-search-close"></span>
    </div>

    (So when Divi Ultimate Plugin is activated, both sets of code are displayed in the source code.)

    And the SmartCrawl Pro plugin indicates that there shouldn't be two different items named the same as role="search". They suggest, to fix this, that the "role="search" should be changed to anything other than just "search" such as role="search-ultimate" or role="search-free-outer" .. just not "search". Or maybe the role for search in the Divi Ultimate Plugin should be removed? What do you think would be the best way to resolve this?

    I'm just looking for your thoughts and advice.

    WPMUDEV is telling me that this could potentially cause issues and if possible, I should not have more than one role used on a page, that would be named the same.

    Please let me know what you think.

    Thanks,
    Gary

    SITE: https://www.wpbns.com/
     
    1. PRO MEMBER PERKS Divi Ultimate Child Theme - Tons of premade layouts & section designs + functionalities for your Divi site:Learn More
  2. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    To remove the role="search", try the below code in WP Admin > Divi > Theme Options > Integration > Body Code:
    Code:
    Log In or Sign Up to view this code.
     
  3. Gary Gordon

    Gary Gordon Member
    Pro Member

    I made this change. The code shows up in my source code for the page. But the lines and 2nd reference to role="search" still appears.

    <div class="free-search-outer">
    <form role="search" method="get" class="et-search-form" action="https://www.wpbns.com/"><input type="search" class="et-search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" />
    </form>
    <span class="free-search-close"></span>
    </div>

    See: https://www.wpbns.com/

    Thoughts?
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade gradient text design for your Divi site without using any plugins:View Demo
  4. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    I checked using inspect element & the role="search" seems to be removed. See screenshot below:

    upload_2020-5-11_22-17-46.png
     
  5. Gary Gordon

    Gary Gordon Member
    Pro Member

    I'm still seeing:

    <div class="container et_search_form_container">
    <form role="search" method="get" class="et-search-form" action="https://www.wpbns.com/">
    <input type="search" class="et-search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" /> </form>
    <span class="et_close_search_field"></span>
    </div>


    <div class="free-search-outer">
    <form role="search" method="get" class="et-search-form" action="https://www.wpbns.com/"><input type="search" class="et-search-field" placeholder="Search &hellip;" value="" name="s" title="Search for:" />
    </form>
    <span class="free-search-close"></span>
    </div>

    in the source code on the home page. I checked this in two browsers.

    :(

    Gary
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade promo bar / notification bar with close button for your Divi site without using any plugins:View Demo
  6. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    jQuery code doesn't affect your site original source code. It only make the changes when you view your site: https://stackoverflow.com/questions/8598836/jquery-dom-changes-not-appearing-in-view-source

    To view your current site HTML, just visit your site & right click > inspect element: https://recordit.co/WFGXuqYwoU
     
  7. Gary Gordon

    Gary Gordon Member
    Pro Member

    But the code needs to be changed otherwise it will potentially cause issues, which is why it is being flagged. Suggestions? The duplicate role being applied (more than once on a page) is the issue.
     
    1. PRO MEMBER PERKS Divi.Help Header AI Generator - Try the power of AI to generate a custom Divi header for you:Try Now
  8. Divi.Help Pro Support

    Divi.Help Pro Support Administrator
    Staff Member

    For that case, will need to edit the plugin file.

    1. Go to WP Admin > Plugins > Plugin Editor

    2. Select Divi Ultimate Header Plugin. See screenshot below:

    upload_2020-5-12_21-30-38.png

    3. Scroll down to line 872 & delete role="search"