[Support request] Aria Values Invalid – Lighthouse Audit

Home Forums Support Aria Values Invalid – Lighthouse Audit

This topic contains 3 replies, has 2 voices, and was last updated by  David 2 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1193335

    David

    Lighthouse is giving me an error on every image: [aria-*] attributes do not have valid values

    <figure id="attachment_4324" class="wp-caption alignnone" aria-describedby="caption-attachment-4324">

    Is there a filter to replace the auto generated IDs with the actual image caption?

    I’ve had similar issues with navigation elements not having IDs and was povided a filter from my old theme designer. Any other advice is appreciated. Thanks.

    #1193572

    David Customer Support

    Hi there,

    the aria-describedby="caption-attachment-4324" looks perfectly valid – as that attribute is meant to contain the ID ( or IDs ) of the Element(s) that provides the aria description.

    Replacing its value with the actual caption would be a complete failure according to the aria spec.

    The problem is you have a figure that is expecting a figcaption eg.

    <figcaption id="caption-attachment-4324" class="wp-caption-text">This is the caption aria-describedby is looking for</figcaption>

    Instead it looks like something has changed the markup to a span that does not contain the relevant ID.

    Are you using a plugin or other code that is affecting how these images are output?

    #1194012

    David

    Hi David,

    Thanks for your timely support.

    It seems that now it’s not even an issue. Sometimes Lighthouse is like that – even though I always run it in an incognito window.

    So you can mark this as completed. Cheers. 🙂

    #1194247

    David Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.