Page MenuHomePhabricator

IDREF attribute for references an unknown ID "wpSourceTypeFile"
Closed, ResolvedPublic

Description

Author: t.glaser

Description:
Special:Upload is invalid XHTML:

<tr class="mw-htmlform-field-UploadSourceField"><td class="mw-label"><label for="wpSourceTypeFile">Source filename:</label></td><td class="mw-input"><input id="wpUploadFile" name="wpUploadFile" size="60" type="file" />

The “for” attribute of the <label/> must reference an “id” of another tag, but the tag in question is named “wpUploadFile”.

This is lines 840 (and probably 855) and 1118 of mediawiki-1.19.2/includes/specials/SpecialUpload.php, but a quick diff shows git master (6a2ae3244eb2b8ea9c7dcadb528caca08238913e as of today) seems to also be affected.

I don’t know enough about the intricaties of this code to propose a fix, sorry.


Version: 1.23.0
Severity: normal

Details

Reference
bz40889

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:08 AM
bzimport set Reference to bz40889.
bzimport created this task.Oct 9 2012, 11:43 AM

I'll take a look at this this weekend, labels are a nice thing to have.

Thanks for reporting :)

sumanah wrote:

Thanks for the heads-up, Thorsten. Also cc'ing some other folks interested in accessibility.

This is invalid XHTML and could hurt accessibility; screen readers and/or people who need bigger click targets might benefit from fixing this.

I've fixed this in change I19e06a3b. I mentioned in the commit message that this won't change anything functionally in Firefox, because of upstream bug [0]. But Chromium and others should work now.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=701353

Change merged.

t.glaser wrote:

Confirmed, with 9b09b55b7c09fa3e6591dffa2024b1b72ecfa053 on top of my current 1.19.2-Debian-based tree, the Special:Upload page is valid XHTML again.

Thanks!

?!!!!! You've broken the upload form in case there are URL uploads enabled.

Please check if something is used in other places before you change it. In this case that was the label ID and it is used as ID of radio button, if URL uploads (or other possible upload source types) are enabled.

Change 88443 had a related patch set uploaded by VitaliyFilippov:
(bug 40889) Follow-up 6f1d4db3: Fix the upload form when radio buttons are shown.

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

OK, I've just posted a fix - please review it someone...

I would also suggest backporting this into LTS 1.19.

Hellllllllllllllllllllloooooooooooooooooooooooooooooooooooo anyoooooooooooooooooooonnnnnneeeeeeeeeeeeeeeeeeeeeeeee

A friendly ping asking to review https://gerrit.wikimedia.org/r/#/c/88443/ is more welcome than comment 9.

Maybe mtraceur could review that 5-liner patch?

I'm sorry :)

...Perhaps I don't have enough patience to do friendly pings instead of "hellooooo" for each patch :(:(:(

Change 88443 merged by jenkins-bot:
(bug 40889) Follow-up 6f1d4db3: Fix the upload form when radio buttons are shown.

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

Thank you very much!! :)

Now the mediawiki trunk has working URL uploads again! :)

poke added a comment.Oct 8 2014, 2:42 PM
  • Bug 71689 has been marked as a duplicate of this bug. ***
Gilles raised the priority of this task from Normal to Unbreak Now!.Dec 4 2014, 10:11 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Normal.Dec 4 2014, 11:21 AM