Page MenuHomePhabricator

is_js_only attribute is not valid and should be removed from HTML output - fails validation
Closed, ResolvedPublic

Description

The Minerva skin is mostly w3c compliant except one error:
https://validator.w3.org/nu/?doc=http%3A%2F%2Fen.m.wikipedia.beta.wmflabs.org%2Fwiki%2FTimeline_of_the_presidency_of_Barack_Obama_%282010%29
"Attribute is_js_only not allowed on element a at this point."

This is a shame and should be fixed.
I'm not sure what this is here for so should be removed from the HTML output

Details

Related Gerrit Patches:
mediawiki/extensions/MobileFrontend : masterRemove the 'is_js_only' attribute from page actions links HTML

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 26 2016, 8:11 PM
TheDJ added a subscriber: TheDJ.May 27 2016, 7:41 AM

you can use a data-mw prefixed attribute, which are sanitized.

TheDJ added a comment.May 27 2016, 7:43 AM

although... isn't this why we have the .client-js and .client-nojs classes ? Why is the attribute needed at all ?

bmansurov added a comment.EditedMay 27 2016, 1:40 PM

although... isn't this why we have the .client-js and .client-nojs classes ? Why is the attribute needed at all ?

You're right. This was meant to be used as a flag to use one of the classes you mentioned. It was not supposed to be output with the HTML. An oversight on my end.

Danny_B triaged this task as High priority.May 27 2016, 1:41 PM
Jdlrobson raised the priority of this task from High to Needs Triage.May 27 2016, 10:02 PM
Jdlrobson added a project: good first bug.

Not sure this is high. Will consult with the devs on Mon/Tuesday. Easy fix if anyone wants to volunteer a patch over the weekend (I'd love you forever :-))

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMay 27 2016, 10:02 PM

Change 291370 had a related patch set uploaded (by Bmansurov):
Remove the 'is_js_only' attribute from page actions links HTML

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

Change 291370 merged by jenkins-bot:
Remove the 'is_js_only' attribute from page actions links HTML

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

Jdlrobson closed this task as Resolved.May 30 2016, 4:21 PM
Jdlrobson claimed this task.