Page MenuHomePhabricator

Loss of 'alt' texts when manipulating image presentation form
Closed, ResolvedPublic

Description

As an editor using VE within MediaWiki, I would like to be able to change the presentation form of an image (in this case from "thumbnail" to "fullsize") without loosing the "alt" text. I can provide the following example edit from OpenStreetMap wiki: https://wiki.openstreetmap.org/w/index.php?title=Sandbox&type=revision&diff=1791566&oldid=1791564. It looks to me like a data corruption, because the original "alt" data is lost but there would be no need to change it. The HTML contains the filename as alt text for the image.
I would expect:

[[File:Openstreetmap.jpg|alt=This is some OpenStreetMap logo including the label "OpenStreetMap".]]

But I get:

[[File:Openstreetmap.jpg]]

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterMWInlineImageNode: don't discard alt text when serializing

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 15 2019, 9:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF moved this task from To Triage to Up next on the VisualEditor board.Feb 26 2019, 4:55 PM
rugk added a subscriber: rugk.Mar 17 2019, 10:35 PM

Downstream report at: https://github.com/openstreetmap/operations/issues/172

Personally I never saw/could reproduce this on any Wikipedia/Wikimedia site…

FellTiger added a comment.EditedMar 18 2019, 11:57 AM

I reproduced this in the MediaWiki wiki today: https://www.mediawiki.org/w/index.php?diff=3141572&oldid=3135703&title=VisualEditor:Test&type=revision&diffmode=source.
Exactly the same issue.
It looks to me as if images of type basic do not store alt texts at all.

DLynch claimed this task.Mar 28 2019, 4:17 PM
DLynch edited projects, added VisualEditor (Current work); removed VisualEditor.

Change 499805 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/VisualEditor@master] MWInlineImageNode: don't discard alt text when serializing

https://gerrit.wikimedia.org/r/499805

Change 499805 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] MWInlineImageNode: don't discard alt text when serializing

https://gerrit.wikimedia.org/r/499805

ppelberg closed this task as Resolved.Apr 23 2019, 12:36 AM

Thanks for fixing @DLynch !