Page MenuHomePhabricator

Allow additional attributes in file / image links
Open, Needs TriagePublic

Description

includes/parser/Parser.php allows [[File:…]] links to have two <img> attributes as parameters: alt and class.

Adding the id attribute would make it easier to style and write scripts for images. For instance, [[File:Placeholder.png|id=image-to-replace]].

Adding the role and aria-describedby attributes would allow more accessibility context. For instance, [[File:Horizontal rule.gif|link=|alt=|role=separator]] or [[File:Lemon.jpg|alt=yellow fruit|aria-describedby=lemon-caption]].