On Tue, Apr 15, 2014 at 1:09 PM, Guillaume "Louis-Marie" Delhumeau <[email protected]> wrote: > (There is already a JIRA issue about this topic, see > http://jira.xwiki.org/browse/XWIKI-7552 ). > > The new skin, Flamingo, uses the Bootstrap Framework, which is designed to > be used with HTML5. For example, the drop down buttons [1] use the > attributes "data-*" that was introduced recently and that are not valid in > XHTML 1.0 Strict. Since HTML5 is becoming the new standard, I think it's > time to switch to HTML5, at least for Flamingo. > > With the help of Thomas, I have already added an HTML5 validator in our > build tools, based on validator.nu [2]. In the future, we need to change > the enterprise tests suite to use this validator and the flamingo skin. > > ------------------------- > What are the blockers ? > ------------------------- > > ----- > Meta tags > ----- > > In Colibri headers, we used to define some meta tags used by some > javascript components. These tags are: > - <meta name="document" content="Main.WebHome"/> > - <meta name="wiki" content="xwiki"/> > - ... and so on. > > In my opinion, they are useless, because we also defines some variables: > - XWiki.currentWiki = "xwiki"; > - XWiki.currentSpace = "Main"; > - XWiki.currentPage = "WebHome"; > - ... and so on. > > The problem is: these tags are not valid in HTML5 because the specification > mentions that custom meta names should be registered on > http://wiki.whatwg.org/wiki/MetaExtensions. See > http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#other-metadata-names > . > > Other problem: if we simply remove them, we will break some javascript > codes. > > ----- > Internet Explorer meta tag > ----- > > Bootstrap defines the following meta-tag: > <meta http-equiv="X-UA-Compatible" content="IE=edge"> > > It is used to prevent Internet Explorer from using the compatibility mode > (which is the default setting on intranet sites). As before, this meta tag > is not valid. It is interresting to notice that even the bootstrap site is > not valid, because of that. > > In my opinion, we need this meta-tag and we should ignore this HTML5 > violation. > > ----- > Use HTML5 or XHTML5? > ----- > > XHTML5 is only a subset of HTML5 so that it is XML compliant. If we want to > use it, we need to change the MIME type of our pages to > "application/xhtml+xml" or "application/xml" [3]. But then, the browser is > not error-tolerant anymore (I have only tested with Firefox and I hit the > issue). > > ----- > Update HTMLCleaner > ----- > > HTML Cleaner generates this code: > <img src="..."></img> > which is not valid. > > ------------------------ > Proposal > ------------------------ >
> 1. Break the javascript compatibility and remove invalid <meta> tags, > except the Internet Explorer specific one. No. Remove them from the HTML generated on the server *but* add them from JavaScript (from compatibility.js for instance) so that extensions that still need them continue to work. We do something similar for instance with the 'rel' attribute which is transformed into 'target' on the client. > 2. Update the HTML Cleaner. +1 > 3. Use HTML5 to avoid the XML specific problems. We can change this in the > future. Why not generate XHTML5 on the server but with the default HTML5 doctype (at least for now). I mean, we validate our pages against XHTML5 but we tell the browser it's HTML5. I don't see any problem with this. > 4. Do not touch the XWiki Rendering code because it generates XHTML, which > is still valid in HTML5 [4]. Same for the WYSIWYG editor. +1 > 5. Update the enterprise test suite to also tests pages with the flamingo > and the new HTML5 validator. +1 Thanks, Marius > > WDYT? > > Louis-Marie > > ---------------------- > Links > ---------------------- > [1] http://getbootstrap.com/components/#btn-dropdowns > [2] http://jira.xwiki.org/browse/XWIKI-10249 > [3] http://en.wikipedia.org/wiki/HTML5#XHTML5_.28XML-serialized_HTML5.29 > [4] http://en.wikipedia.org/wiki/Polyglot_markup > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

