Page MenuHomePhabricator

Semantic media roles
Open, LowPublic

Description

(This is an early draft for an RfC)

There are several interrelated problems with the current media inclusion syntax that have to do with poor separation of content and presentation:

  • presentation-related parameters (e.g. size) are too specific and prevent effective use of the image in different environments then what the editor inserting the parameters was testing with. This is a frequent problem even with different desktop sizes, but becomes much worse for mobile and print.
  • the ability to influence the placement and display of images is limited, so editors wrap images into templates which add the positioning (e.g. {{multiple image}}), making the problem worse
  • skins cannot interact with image code generation, which mostly happens in the parser
  • integration between the content and the layout is becoming the norm for high-quality websites (head images are a simple example of this; for more advanced ones, look at this or this or this), and MediaWiki completely lacks the tools for that

What we need is an ability of content editors to assign semantic roles to images, and a wide authority for the skin the decide the right presentation based on those roles. That includes generating the markup for the image, but ideally also extends to altering the placement of the image in the DOM (e.g. if an editor puts an image with the semantic role "main image" after the intro paragraph, the skin should be able to pull that up to the beginning and turn it into a head image).

A possible first step is T90914; that task also contains a discussion of some of the difficulties this presents for cache invalidation.

See also T103630 which is a similar proposal for templates.

Event Timeline

Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a project: MediaWiki-File-management.
Tgr added subscribers: Tgr, Spage.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr set Security to None.

I've been using T90914 as the main task for this problem.