Home New Guten › Forums › WoodMart support forum › Carrinho l Aria-Label do Adicionar
Carrinho l Aria-Label do Adicionar
- This topic has 9 replies, 2 voices, and was last updated 1 year, 9 months ago by
Luke Nielsen.
-
AuthorPosts
-
October 18, 2023 at 8:31 pm #505262
rbaeta01ParticipantNo 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;
});October 19, 2023 at 10:05 am #505345
Luke NielsenKeymasterHello,
May I request you send me a screenshot of that issue and the website showing it?
Looking forward to collaborating with you!
Kind Regards
October 19, 2023 at 4:54 pm #505476
rbaeta01ParticipantBom dia, segue crítica do pagespeed com apontamento do carrinho.
Attachments:
You must be logged in to view attached files.October 20, 2023 at 5:11 pm #505798
Luke NielsenKeymasterHello,
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
October 25, 2023 at 9:15 pm #507238
rbaeta01ParticipantOlá 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.October 26, 2023 at 10:47 am #507400
Luke NielsenKeymasterHello,
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
October 26, 2023 at 1:03 pm #507481
rbaeta01ParticipantBom 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.
October 27, 2023 at 2:35 pm #507889
Luke NielsenKeymasterHello,
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
October 27, 2023 at 4:11 pm #507930
rbaeta01Participantmas a estrutura está em qual pasta?
October 30, 2023 at 5:37 pm #508578
Luke NielsenKeymasterHello,
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
-
AuthorPosts
- You must be logged in to create new topics. Login / Register