[RFC] HTML5 Semantic Elements

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
Louis7777
Registered User
Posts: 385
Joined: Fri Apr 04, 2014 12:32 am

[RFC] HTML5 Semantic Elements

Post by Louis7777 » Fri Apr 04, 2014 4:27 pm

I searched for other RFCs before posting this, using the keywords "html5" and "semantic", but I could only find this relevant topic: Prosilver Overhaul/Modernization

Most of the discussion there is from 2011 and it was even debated whether HTML5 should be used in 3.1. Someone made the specific suggestion - that I'm about to make - in a post at the aforementioned discussion, but it was back in 13/3/2011 and it was kinda overlooked as the topic was about several improvements.

So now that we're using HTML5, how about replacing some DIVs with some of the newer semantic elements of html5:

<header>, <nav>, <section>, <aside>, <article>, <footer>

Internet Explorer 8 and earlier versions of IE don't support those elements, but that could be fixed with some JavaScript:

Code: Select all

<!--[if lt IE 9]>
        <script type="text/javascript">
        document.createElement("nav");
        document.createElement("header");
        document.createElement("footer");
        document.createElement("section");
        document.createElement("aside");
        document.createElement("article");
        </script>
<![endif]-->
OR something like

Code: Select all

<!--[if lt IE 9]>
<script type="text/javascript" src="html5forIE8.js"></script>
<![endif]--> 
As for those who are using Internet Explorer 8 AND have disabled JavaScript... well... they were asking for it, right? :twisted:

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: [RFC] HTML5 Semantic Elements

Post by PayBas » Fri Apr 04, 2014 4:32 pm

We would need to include something like html5shiv

User avatar
Louis7777
Registered User
Posts: 385
Joined: Fri Apr 04, 2014 12:32 am

Re: [RFC] HTML5 Semantic Elements

Post by Louis7777 » Fri Apr 04, 2014 4:38 pm

Yeah, I saw that at the w3schools site, but is it necessary? I mean what more do we need other than a simple "createElement"?

pawel92
Registered User
Posts: 6
Joined: Sun Mar 30, 2014 1:14 pm

Re: [RFC] HTML5 Semantic Elements

Post by pawel92 » Fri Apr 04, 2014 5:48 pm

PayBas wrote:We would need to include something like html5shiv
rather use Modernizr.

Through this script does not need to unnecessarily limit and trim the functionality of the new, future phpbb to IE 6-8.

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: [RFC] HTML5 Semantic Elements

Post by Sumanai » Fri Apr 04, 2014 6:38 pm

pawel92 wrote:Through this script does not need to unnecessarily limit and trim the functionality of the new, future phpbb to IE 6-8.
IE 6-8 is not are relevant.
Sorry for my English.

User avatar
PayBas
Registered User
Posts: 305
Joined: Tue Jul 29, 2008 6:08 pm
Contact:

Re: [RFC] HTML5 Semantic Elements

Post by PayBas » Sat Apr 05, 2014 3:13 am

pawel92 wrote:
PayBas wrote:We would need to include something like html5shiv
rather use Modernizr.

Through this script does not need to unnecessarily limit and trim the functionality of the new, future phpbb to IE 6-8.
Modernizr uses html5shiv.

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] HTML5 Semantic Elements

Post by Pony99CA » Sat Apr 05, 2014 3:25 am

Sumanai wrote:
pawel92 wrote:Through this script does not need to unnecessarily limit and trim the functionality of the new, future phpbb to IE 6-8.
IE 6-8 is not are relevant.
You're wrong about IE 8. Read why IE 8 should still be supported. (You posted in that topic a bit later, so maybe you already have read it.)

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Louis7777
Registered User
Posts: 385
Joined: Fri Apr 04, 2014 12:32 am

Re: [RFC] HTML5 Semantic Elements

Post by Louis7777 » Sat Apr 05, 2014 3:34 am

Again, why use html5shiv?

document.createElement("nameOfElementHere"); creates a block element that will work like a <div>.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] HTML5 Semantic Elements

Post by callumacrae » Tue Apr 08, 2014 10:14 pm

Louis7777 wrote:Internet Explorer 8 and earlier versions of IE don't support those elements
IE8 is dead

According to the specification, "the <div> element is used as an element of last resort". So, +1 for this.

This article should be helpful—a lot of people use them wrongly, as explained here.
Made by developers, for developers!
My blog

User avatar
VSE
Extension Customisations
Extension Customisations
Posts: 670
Joined: Mon Mar 08, 2010 9:18 am

Re: [RFC] HTML5 Semantic Elements

Post by VSE » Tue Apr 08, 2014 10:27 pm

I'm all for a modern semantic HTML5 based thing. But not in phpBB 3.1.... Save it for phpBB 3.2, where we can simultaneously drop all support for IE8 and below, move on to jQuery 2.X and not have to worry at all about using HTML5 SHIV or Modernizr or any other bloat meant to keep old IE afloat. For sure, by the time 3.2 is ready, IE8 will be looooooong gone.
Has an irascible disposition.

Post Reply