Home New Guten Forums WoodMart support forum Carrinho l Aria-Label do Adicionar

Carrinho l Aria-Label do Adicionar

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

    rbaeta01
    Participant

    No pagespeed aponta crítica do aria-label para adicionar produto no carrinho (ícone), precisei adicionar o código a seguir para resolver, porém isso poderia ser atualizado nativamente para não ter crítica.

    /*Corrigir Aria-Label do Botão Adicionar ao Carrinho nos Produtos*/
    // Selecione todos os elementos com a classe desejada
    var elements = document.querySelectorAll(‘.button.product_type_variable.add_to_cart_button.add-to-cart-loop’);
    // Altere sobre os elementos e ajuste o texto visível para corresponder ao atributo aria-label
    elements.forEach(function(element) {
    var ariaLabel = element.getAttribute(‘aria-label’);
    element.textContent = ariaLabel;
    });

    #505345

    Luke Nielsen
    Keymaster

    Hello,

    May I request you send me a screenshot of that issue and the website showing it?

    Looking forward to collaborating with you!

    Kind Regards

    #505476

    rbaeta01
    Participant

    Bom dia, segue crítica do pagespeed com apontamento do carrinho.

    Attachments:
    You must be logged in to view attached files.
    #505798

    Luke Nielsen
    Keymaster

    Hello,

    Is there any chance that you could give me access to the dashboard area so I can have a look at the settings on your website, please?

    Kind Regards

    #507238

    rbaeta01
    Participant

    Olá Amigo, tudo bem?

    Não preciso passar meu acesso, o próprio tema demo tem este problema e você pode consultar.

    https://woodmart.xtemos.com/demo-glasses/demo/glasses/

    Se processar no pagespeed vai apontar o mesmo problema para mobile no botão de “carriho” na página home ou loja para produtos.

    Segue o print do próprio teste pagespeed/.

    Consegui resolver colocando o código no javascript, porém seria interessante, ser ajustado nativamente para não precisar fazer este tipo de correção manual.

    Attachments:
    You must be logged in to view attached files.
    #507400

    Luke Nielsen
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?

    Kind Regards

    #507481

    rbaeta01
    Participant

    Bom dia, testei o o tema padrão do wordpress e ocorre o mesmo problema, só preciso saber qual php do woodomart é gerado o botão com o ícone do carrinho para ajustar lá no tema filho, caso contrário, vou deixar com o código de javascript que coloquei no tema woodmart para resolver o problema.

    #507889

    Luke Nielsen
    Keymaster

    Hello,

    The “add to cart” button is generated via woodmart_add_loop_btn PHP hook.

    In case you need any additional help, I’d be more than happy to assist you.

    Kind Regards

    #507930

    rbaeta01
    Participant

    mas a estrutura está em qual pasta?

    #508578

    Luke Nielsen
    Keymaster

    Hello,

    This woocommerce_template_loop_add_to_cart function is responsible for showing the button on the archive page and you can find it here: wp-content/plugins/woocommerce/includes/wc-template-functions.php

    Kind Regards

Viewing 10 posts - 1 through 10 (of 10 total)