[html5] Would like some feedback regarding my markup

Hi guys and gals,

As other I’m in the process of switching to html5! Awesome stuff, but I’m in doubt regarding some markup I’m using at the moment. Because I’m not a professional I would like too ask the pro’s what they think of my solution. I have a section with the role of main that wraps around several articles each with the role of article. I don’t use the section for styling, it’s function is a pure landmark. Is this the correct use of the section element? Note: this is used on a page which list all the blog posts.

Then I have a single post page. Again, I’m using a section with the role of main that wraps around an article with the role of article. I close this section right after a footer. Then I start a new section for comments. That section has no role. I was wondering is this is correct? Or should the section with the role of main wrapping around the article and comments?

The new HTML5 elements are mostly designed to do away with roles (are you talking about ARIA roles?). Remember that HTML5 is not yet recognized by browsers, so offers no advantages now … if it ever will … and it will change a lot before it’s finished (it’s only in the very first proposal draft stage right now).

While it’s worth getting to know HTML5, it’s not really a good idea to build sites with it (despite what you hear from the Don Quixote evangelists who are riding around on their horses out in the ocean and shaking their HTML5 banners …) The new HTML5 elements can only breathe right now with the aid of a CSS+JavaScript life support system, which is a ridiculous abuse of all the web standards that have been touted for so many years now.

On the contrary, roles are becoming native. That is, checkboxes have always been checkboxes but now with an actual default “checkbox” role! But haha, the roles are still being rolled out, so to speak.
At least some browsers have been able to pass these roles on to AT, which is how we know NVDA had that bug where a nav element with an author-added role of “navigation” tacked on actually announced two navigation roles! It was able to read the one from the plain nav tag.

@ wollen muts :smiley: lekker warm! But so itchy!

Bruce Lawson likes to call “main” a “Scooby Do” problem. In Scooby Do, the person who was the monster or ghost was any character in the show who wasn’t one of the Gang. To determine if your box makes sense as “main”, just check off that it’s not:
(main chunks of a page)

Whoever’s left, is going to be main. And yeah, even if there are a bunch of separate articles in that box, I think main can be a good role for whatever’s wrapping those articles, if it’s the main content of that page. You’ll have just one main role per page, and it doesn’t really matter if inside the articles are more headers and footers and comments and whatnot.

@ralph.m: Yeah I’m talking about ARIA roles. Does that change anything about your reply?

@Stomme poes: Purrrr… (;

Well, I otherwise agree with Ralph even though ARIA is separate from HTML5 (it started out as an HTML5 project to bring in the “role” idea from XHTML2’s XForms, if you’ve seen those… “aaa:somerole” etc). HTML5 is in draft still, and various parts of it are in various stages of stability. Some of it is pretty stable and safe to use. Some of it only works with Javascript or polyfills. Some of it doesn’t work at all. So long as you’re aware of what you can use for the audience you’re focusing on, you can use what you want of it.

ARIA, btw, can work fine with HTML4/XHTML1. Sure, the validator complains, but the HTML5 validator.nu recognises ARIA roles and landmarks and they’re fine to use regardless. Browsers and AT who don’t understand ARIA will just ignore them.