• Resolved James Hunt

    (@bonkerz)


    Hi

    UM inserts the following line to every page of my site:

    <a href="javascript:void(0);" data-action="um_remove_modal" class="um-modal-close" aria-label="Close view photo modal">
    		<i class="um-faicon-times"></i></a>

    Google Lighthouse classes this as an uncrawlable link – Search engines may use href attributes on links to crawl websites. Ensure that the href attribute of anchor elements links to an appropriate destination, so more pages of the site can be discovered.

    The line is added by line 14 of includes/admin/assets/js/um-admin-modal.js

    How can we disable this line by page, disable it completely or make it compatible with accessibility/SEO guidelines?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @bonkerz

    You can try removing the modal template and just show the overlay in user page with the following code snippet:

    add_action("template_redirect", function(){
    
        if( ! um_is_core_page("user") ){
            remove_action( 'wp_footer', array( UM()->modal(), 'load_modal_content' ), 9 );
        }
    });

    Regards,

    Thread Starter James Hunt

    (@bonkerz)

    Solved it, thanks! ??

    @champsupertramp thanks for sharing the code, however it is quite frustrating that the plugin introduces this SEO and Accessibility bug that every plugin consumer must fix manually with this hack.

    Is this something that will be fixed in the future? Where can we track it?

    There are many support posts about excluding UM files and markup. It would be helpful if the development philosophy of the plugin was to only include plugin code when it was necessary.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncrawlable Link from UM on every page of website’ is closed to new replies.