Page MenuHomePhabricator

Remove $wgAllowMicrodataAttributes and $wgAllowRdfaAttributes settings
Closed, ResolvedPublic

Description

The setting $wgAllowMicroDataAttributes could be removed and the microdata attributes could always be allowed.

There doesn't seem to be an evident case use where a wiki could benefit of filtering these attributes, and we now are in HTML 5, so it would simplify MediaWiki configuration.

In the same time, we'll remove $wgAllowRdfaAttributes and so always allow full semantic attributes.

History

Event Timeline

I wonder if by coherence we shouldn't handle also $wgAllowRdfaAttributes at the same time.

Change 277562 had a related patch set uploaded (by Dereckson):
Remove $wgAllowMicroDataAttributes setting

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

I wonder if by coherence we shouldn't handle also $wgAllowRdfaAttributes at the same time.

If Microdata and RDFa can coexist together without any issue, let's remove both "allow" variables.
If they can't, have rather some sort of more generic variable with predefined values. Eg. $wgMetadataType = "microdata"; $wgMetadataType = "rdfa" (or any other name, this is quick first shot) which would actually prevent accidental setting of both (or even more) "allow"s to true and then possible conflicts.

(removed not relevant microformat/RDFa compatibility notes)

About the opportunity of a setting.

I've shortly discussed the issue with @Danny_B on IRC. Before filling T128829 (and later T130034), Danny didn't find any use case where the setting would be interesting and added "the only concern may be the invalidity of output, but my assumption was that tidy removes that if necessary".

Okay, so @daniel on Gerrit indicates a preference to also remove $wgAllowRdfaAttributes.

We should document loudly somewhere $wgHtml5Version, so people knows they have to choose a modified HTML version. This could be for example a page on mediawiki.org "How to use RDFa on MediaWiki?". Note this is not a job done by $wgAllowRdfaAttributes, but currently, during the setup if you enable the first, it suggests a correct default version.

Dereckson renamed this task from Remove $wgAllowMicrodataAttributes setting to Remove $wgAllowMicrodataAttributes and $wgAllowRdfaAttributes settings.Mar 17 2016, 3:51 PM
Dereckson updated the task description. (Show Details)
Dereckson updated the task description. (Show Details)

Change 277562 merged by jenkins-bot:
Remove $wgAllowMicroDataAttributes and $wgAllowRdfaAttributes

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

By the way, the version problem will be simplified when we'll move to 1.1:

XML mode XHTML5+RDFa 1.1 documents should be labeled with the Internet Media Type application/xhtml+xml as defined in section 12.3 of the HTML5 specification [html5], must not use a DOCTYPE declaration for XHTML+RDFa 1.0 or XHTML+RDFa 1.1, and should not use the @version attribute.