XF 2.3 How can I remove aria-hidden="true" from a carousel?

USCSS_Nostromo

Active member
XF 2.3.9

The PageSpeed Insights page reports many errors and lowers the score because of aria-hidden="true.

Here is the code:
Code:
<li class="carousel-container f-carousel__slide" data-index="6" aria-hidden="true">...
I can’t find where this code is being inserted.
It seems to be initialized by the CAS plugin. The author of that plugin says that it has nothing to do with the aria-hidden="true" line and that it simply uses a standard carousel.
Can you tell me how to find and remove the aria-hidden="true" attribute from the carousel?
 
that's a false-positive. Don't remove that IMO.
I don’t understand what you’re calling a false positive when I can look at the code and clearly see that the PageSpeed Insights service is absolutely right.
It drops the score from 100 to 82–86 because of stupid HTML code.

A child who has just started learning HTML would write better code than the people who created this carousel. And this is not a XenForo company issue.

I look at the code and see that inside a <ul>they are using <div> instead of <li>.
Do you call that a false positive?
How is that even possible? Is it against their religion to write <li>?

Yes, aria-hidden="true" should not be removed. Instead, according to the rules, links <a href=""> inside a block with aria-hidden="true" should be given tabindex="-1".

But for “programmers” who can’t even put <li> inside a <ul> instead of <div>, understanding tabindex parameters is still a long way off.
 
Well, removing aria rules won't fix the core html problems. If there's issues there, that's a different story and yes should be fixed.

aria hidden = true means things like screen readers will skip the content.
using tabindex means the content is still focusable and will engage in the content.

Page speed should be unaffected by an aria attribute as the element is still loaded/rendered, whether it is read by the reader device or not to the end user.
 
Back
Top Bottom