Page MenuHomePhabricator

Lighthouse empty link problem for thumbnail images with link parameter
Open, Needs TriagePublicBUG REPORT

Description

Thumbnails with the syntax "File:image.jpg|thumb|link=Page" are always rendered with the additional a.mw-file-magnify to always provide a link to the original image description page even of the image links to the URL specified by the link parameter. This is not described here yet https://www.mediawiki.org/wiki/Help:Images, but mentioned on the Wikipedia page https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax#Link

This a.mw-file-magnify element unfortunately is always a link with neither a link text nor a link image (because the icon is added via CSS). This leads to the Lighthouse error "Links do not have a discernible name" which could be highly problematic to screen readers. You can test this behavior with the following link, the element in question is in the linked chapter https://en.wikipedia.org/wiki/Wikipedia:Images_linking_to_articles#With_a_caption

Request: Please fix. Maybe use a text or a hidden text or an aria-label like "Visit image description page to IMAGE-LINK" or an image with alt attribute. Here are the official instructions https://dequeuniversity.com/rules/axe/4.9/link-name