-
AuthorPosts
-
December 20, 2022 at 4:23 pm #1376905
Hi,
when I run pagespeed for my Enfold page following issue appears on mobile:[aria-hidden="true"] elements contain focusable descendents Focusable descendents within an <code>[aria-hidden="true"]</code> element prevent those interactive elements from being available to users of assistive technologies like screen readers.
It seems to mention some resources from the Horizontal gallery.
Any ideas why it complains on mobile test about this? I’ve tried to play with the navigation controls but didn’t change a thing.Thanks
Jaro.December 21, 2022 at 8:21 am #1376961Hey Jaro,
Thank you for the inquirry.
When an element has the attribute aria-hidden=”true”, it indicates to assistive technologies (such as screen readers) that the element and its contents should be ignored. This is often used to hide content that is not relevant to the current context or that is intended to be visually hidden, but not removed from the DOM. However, the theme doesn’t add the aria-hidden attribute to the horizontal-gallery-links by default. The code is located in the enfold\config-templatebuilder\avia-shortcodes\gallery_horizontal\gallery_horizontal.php file around line 772:
$output .= "<a {$lightbox_attr} class='av-horizontal-gallery-link' {$display_char} title='{$lightbox_title}' alt='{$alt}'>";
As you can see, the aria-hidden attribute is not included in the markup. It is possible that a plugin is dynamically adding the attribute to the links.
Best regards,
IsmaelDecember 21, 2022 at 9:33 am #1376965Thanks Ismael for explanation about backend on this.
Is this a bug or expected behaviour? Anything we can do to make google happy?
Just thinking if this should be fixed in theme or not: “However, the theme doesn’t add the aria-hidden attribute to the horizontal-gallery-links by default”Jaro.
December 23, 2022 at 2:29 am #1377180Hi,
Thank you for the update.
Have you tried disabling the plugins temporarily? It is possible that one of the plugin is adding the attribute to the gallery links. We’ve searched the theme directory but we didn’t find any scripts that add this attribute dynamically.
Best regards,
IsmaelDecember 23, 2022 at 8:38 am #1377188Thanks Ismael,
I think it will be done by EWWW Image Optimizer which does the lazy load stuff. I will however test this on my testing page little bit later and let you know.Jaro.
December 24, 2022 at 9:19 pm #1377306Hi,
Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Pagespeed mobile – elements contain focusable descendents’ is closed to new replies.