What features would you like to see in future versions of Joomla?

HTML5 support via XML "switch" in Joomla! templates

Although there have been other requests to add HTML5 support for Joomla!, I think the proposed solutions may complicate things...

Here's a simpler one: let the template developer "choose" HTML5 in the templateDetails.xml file and have Joomla! generate the HTML5 equivalent meta tags that it currently outputs in <jdoc:include type="head" />...

A DEEPER EXPLANATION
A simple solution to "attach" HTML5 per template and not entirely on a Joomla! site is to add a new XML api call in the templateDetails.xml where a template developer can declare if their template is HTML5 compatible or not. Something like:

<ishtml5>true</ishtml5>

That way we can have HTML5 and non-HTML5 templates installed on our Joomla site, without breaking compliance where required. And we can still switch templates per Joomla! site section using different doctypes.

The other proposed solutions either refer to complete code refactoring (takes time) or a "global site switch" in the Global Configuration options (which toggles the entire site HTML5 or not - causes issues where HTML5 may not be suited).

If we let the template developer decide on the HTML doctype, we provide more freedom and flexibility for a better result.

If Joomla! adds options to automatically attach e.g. a js library that makes new HTML5 elements compatible with IE (html5shiv.js for example), we complicate things further, as happened with Mootools in the past. Let the template developer decide on stuff like that too.

All Joomla! needs to do is spit out the right meta info per the HTML5 spec (e.g. <meta charset="utf-8" />). In other words, generate the HTML5 equivalent of existing HTML4 meta tags as output by <jdoc:include type="head" />...

216 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    JoomlaWorksJoomlaWorks shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    26 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • James DurrantJames Durrant commented  ·   ·  Flag as inappropriate

        @malber_o2m - this idea will allow Joomla to output the HTML needed to fully use html5 Boilerplate (HTML).

      • James DurrantJames Durrant commented  ·   ·  Flag as inappropriate

        @JoomlaWorks - Your XML switch solution is the perfect way to deal with Joomla HTML5 output for head data, links, styles and form elements (much better than the global switch I suggested - I moved my votes from it to this).

        More power to the template dev!

        But, unfortunately, when it comes to modules I still believe that there is no other way to fully support HTML5 correctly without putting selection of the wrapping tag in the modules params.

        The main issue is the distinction between relevant & non-relevant page content (ie. if aside should be used or not). This is something a template dev could not predict in every situation. I've looked at this many different ways, and module params/chrome seems to be the only logical solution for full HTML5 support.

        Whilst the mod-chrome and HTML5 switch ideas are related they could be implemented separately (with the switch as a priority of course).

      • JoomlaWorksJoomlaWorks commented  ·   ·  Flag as inappropriate

        @James Durrant Since the template developer has full freedom even there, it's not necessary to have Joomla! core output HTML5. Remember that the key to the solution mentioned is that people who want HTML4 or XHTML1.1, can still make use of these older doctypes.

        I also support your proposal for using:

        <doc>html5</doc>

        ...in the template xml file. Much cleaner and future proof!

        Let's vote for this folks! Come on!

        @Rouven Weßling Thanks for trying to push this for 2.5 (ETA is Feb 2012, right?).

      • Steve AdamsSteve Adams commented  ·   ·  Flag as inappropriate

        With so much going in the HTML5 <head>, why not give options to override the default head.php? I've just had a peek at J1.7 backend. What are those horrid curly corners about?

      • James DurrantJames Durrant commented  ·   ·  Flag as inappropriate

        @JoomlaWorks - of course module chrome can be overwritten, but a core module chrome solution would still be useful.

        Modules can contain any number of content types that could be navigation, relevant page content, non-relevant page content or small-print - nav, small, aside, header, section, footer, div, etc could be used in many different ways. A template developer could not possibly predict all the ways a site builder/admin would want to identify or order their modules.

        If a drop-down menu in the module params (listing available wrapping tags and defaulting to a div) was used, a template dev could then use a core or override module chrome style in each JDOC:module placeholder where relevant.

      • Steve AdamsSteve Adams commented  ·   ·  Flag as inappropriate

        HTML5 is here right now. It's what clients want. Joomla is in danger of being left way behind.

        I'm voting with hands and feet ;)

      • JoomlaWorksJoomlaWorks commented  ·   ·  Flag as inappropriate

        @James Durrant Module containers can be overwritten by template developers, that's why I proposed this solution. Full freedom to template devs and you can easily have any site switch to HTML5! ;)

      ← Previous 1

      Feedback and Knowledge Base