we need a hook to change the loop product link and add an attribute, this is aria-label, in order to avoid an accessibility error. The function that we need to cahange is the
woocommerce_template_loop_product_link_open
from
function woocommerce_template_loop_product_link_open() {
global $product;
$link = apply_filters( ‘woocommerce_loop_product_link’, get_the_permalink(), $product );
echo ‘‘;
}
to
function woocommerce_template_loop_product_link_open() {
global $product;
$link = apply_filters( ‘woocommerce_loop_product_link’, get_the_permalink(), $product );
echo ‘‘;
}
there is a hook already at template files that overrides the function and we cannot fix it.