Site logo

[Support request] Lack of element id

Home Forums Support [Support request] Lack of element id

Home Forums Support Lack of element id

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2163087
    Longinos

    Hi
    I have searched the forum not found nothing related.
    Theme GP and GPP latest versions.
    In the search button there is an aria-controls="primary-menu" but no element with primary-menu id is in the page.
    I see in this site that the element that contains the id in the main menu but in my uses case the main menu is in the off-canvas
    Your site, visible main menu have <div id="primary-menu" class="main-nav">, my site main menu in the off-canvas have
    <div class="main-nav">

    How I can solve this?

    #2163156
    David
    Staff
    Customer Support

    Hi there,

    I am getting an Access Denied return on the URL you provided – can you ‘unlock’ that so I can take a look?

    #2163206
    Longinos

    Hi David
    I can´t see any 403 in the logs.
    And have no recent blocks from fail2ban and not see any access from UK

    P.S: Maybe you have Virgin Connection? Have truobles with UK people. Unblocked now.

    #2163243
    David
    Staff
    Customer Support

    Ok – so its the menu-toggle, would changing that aria-control to the off canvas menu ID fix it? If so you can try this:

    add_filter( 'generate_parse_attr', function( $attributes, $context ) {
        if ( 'menu-toggle' === $context ) {
            $attributes['aria-controls'] = 'generate-slideout-menu';
        }
    
        return $attributes;
    }, 10, 2 );
    #2163256
    Longinos

    I David
    Tried it but still point to primary-menu.

    #2163259
    David
    Staff
    Customer Support

    Try this:

    add_action( 'wp',function(){
        add_filter( 'generate_parse_attr', function( $attributes, $context ) {
            if ( 'menu-toggle' === $context ) {
                $attributes['aria-controls'] = 'generate-slideout-menu';
            }
        
            return $attributes;
        }, 10, 2 );
    });
    #2163266
    Longinos

    Hi David
    This worked. I put this in child functions.php as a workaround, but think this must be managed by the theme himself.
    Maybe in the next release? =:-))

    #2163271
    David
    Staff
    Customer Support

    I have raised it as an issue – I am not sure it will make the next release though.

    #2163293
    Longinos

    Hi David

    Is a joke… =:-)) , do a 90 deggre turn whit = up and )) down
    I know things need time to go out.

    #2163299
    David
    Staff
    Customer Support

    🙂 Its on our list now.

    Glad to be of help

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