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

Event Timeline

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

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

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 task.

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 :-))

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 claimed this task.