BeBuilder linked images: hard-coded accessibility label
Hello,
PageSpeed flags linked image elements under “Identical links have the same purpose”, identifying a failure to follow accessibility best practice. The reported elements have this markup:
role="link" aria-label="Image with links" tabindex="0"
In the BeTheme 28.5.9.1 source, this label is hard-coded in sc_image() in functions/theme-shortcodes.php, around line 10024.
The image element’s custom $link_title is already applied to the inner anchors, but the keyboard-focusable wrapper retains the generic “Image with links” description. This means the supplied link title does not provide a meaningful accessible name for that wrapper.
Could the wrapper’s aria-label use the custom link title when supplied, with an appropriate fallback when it is empty? For example, a linked logo could use “Visit our home page”.
You can see this at [Links visible only for registered users]
Thank you.
Comments
Hi,
I have passed it on to the dev team, and we will correct that.
Best regards
Thank you!