Seeing the list of issues dealing with each element's semantic I thought it would be a good idea to have a more general view of the problem. By defining the desired outline it will be easier to work on those many issues.
I reproduced the outline for page and non-page url ( views, ... ).
First, the current outlines for html5_base ( fresh drupal install, 1 page and 2 articles, main menu in sidebar first with user login block )
- page outline
1. Site title
1. You are here
2. Page title
1. Untitled SECTION
1. Untitled ARTICLE
2. Main menu
3. User login
- non-page outline
1. Site title
1. Untitled SECTION
1. Article 1 title
2. Article 2 title
2. Main menu
3. User login
Here are the outlines for adaptivetheme ( disabled main_menu from sidebar first, already hardcoded into template )
- page outline
1. Site title
1. Primary navigation
2. You are here
3. Page title
1. Untitled ARTICLE
4. User login
- non-page outline
1. Site title
1. Primary navigation
2. Article 1 title
1. Untitled NAV
3. Article 2 title
1. Untitled NAV
4. User login
And finally here are the outlines for omega ( html5 ) ( I omitted unused regions in the outline and removed main menu from sidebar first since it's already in template file )
- page outline
1. Site title
2. Main menu
3. You are here
1. Untitled SECTION
1. Page title
1. Content
2. Untitled ARTICLE
1. Untitled NAV
1. Untitled ASIDE
1. User login
- non-page outline
1. Site title
1. Main menu
1. Untitled SECTION
1. Article 1 title
1. Untitled NAV
2. Article 2 title
1. Untitled NAV
3. Untitled ASIDE
1. User login
I didn't looked at the markup for now, but it seems to me that adaptivetheme's outline is the best I tested so far. I think html5_base should change the position of "Page title" so it becomes a child of "Site title". Appart from that the current outline looks good.
Comments
Comment #1
adrinux commentedThey all look bad to me. I'm coming round to the idea that we need to accept generic containers, good old divs, in the base theme. We have no idea of final content and I find bad semantics worse than no semantics.
Comment #2
Jeff Burnz commentedI'm not sure what outlining tool was used here but something doesnt look right here - in all three there is an untitled article - this is strange because afaict all three themes only use article to wrap nodes, which almost always have titles in all view modes, unless it's removed using a module or from the template, how did you get an untitled article?
Adaptivetheme does have a good outline - I spent a lot of time working on it and developing solutions that would give a proper outline a good majority of the time - its very hard to ensure its always right, people will do what they will with your code and their sites - its practically impossible to account for every scenario, but we can certainly give sensible defaults.
@1 "they all look bad to me" is not really constructive, the OP is asking about what outline to achieve, bringing up the issue of DIV's as generic containers doesn't help solve this issue - there will still be an outline with implied sections, so this is still an issue regardless of what actual markup is used.
Comment #3
adrinux commented@Jeff Burnz by default Drupal puts the title on full page view outside of the node 'container', outside of the node.tpl in fact (it's controlled by page.tpl remember)*, if you haven't altered that in Adaptive theme, that would explain the 'untitled article'. Looks like all three themes idflood checked are the same.
divs as generic containers works around the issue for html5_base and leaves solving the issue to the sub-theme and/or site builder. If/when we do split out html5_foundation ( http://drupal.org/node/1036574 ) we can experiment with outlines in that. I'm arguing that a base theme is too low level to be worrying about semantic containers.
Maybe I'm wrong, after all, you can override it all in a sub theme anyway :) I'm much more interested in seeing html5 base and tools in a useable state, as opposed to perfect.
* I've always found that annoying - and it mostly seems to be done so the tabs can be below the title…
Comment #4
Jeff Burnz commentedlol, yeah I forgot about page titles outside the node, sheesh - that is bloody annoying, but I never really came up with a better solution, I have tried lots - the only real way is to hide the page title for nodes.
Comment #5
idflood commentedI've just checked with the chrome outliner extension and the outlines are the same.
I totally agree with #3. Leave generic container in html5_base and experiments with outlines in html5_fundation: that sounds good.
#4 Duplicating the title is also the only good solution i've found. Even if in some cases there may be "better" solutions, this one should fit most situations.
Comment #6
Jeff Burnz commentedI'm coming to the conclusion that we might need to fundamentally rethink templates entirely - we've had the same basic structure for a long long time. I'd like to see some much higher level conversations regarding the overall structure of drupal templates and how we might improve the whole dam thing. Butler is proposing this idea of Blocks TNG where layouts are basically built using nested blocks inside a panels like UI, we could seriously lay the groundwork for this in D8 - I've been doing a few Panels Everywhere themes and I think Drupal themes might all end up being like this one day, or something pretty close - sorry to drift off topic, just having a brain dump.
Comment #7
adrinux commentedI've been having similar thoughts today. Getting this right can only be done in D8 and will almost certainly require a UI to select wrapper elements, and presumably an API to change and output them.
Haven't used panels a lot. Display suite sounds interesting too, been meaning to take a look at that: http://drupal.org/project/ds
Sounds like it *might* be possible to use as a UI to choose the correct semantic elements for content wrappers. Must install.
But that still leaves us with an issue of what to do right now, for the period when D7 will be used to build sites.
Comment #8
Jeff Burnz commentedD7? Oh no, I have no time for D7, is that what we're talking about here? That baby is done and dusted, no I only have eyes for D8 right now, and bug fixes for D7. If we are still talking about D7 then I am out of here, this was my main worry about coming into this projects issue queue and what I have seen mostly off since arriving, people thinking D7. This is prototype code for D8 isn't it? Why worry for D7 - loads of starter themes for D7 already. I go back to my sandbox if we are working on D7 code here for some production/starter theme thing, I have no interest in building another starter theme.
Comment #9
jensimmons commentedYes, we've been talking about this for months — do we need tpls in core? How might Butler change things? What kind of UI is needed in core to allow people to choose elements when entering content? We'd love to have you join the large discussion that's been going on for a while.
The need for these kind of larger discussions is why we've held off on making task-oriented issues for Drupal 8.
Comment #10
Jeff Burnz commentedWell how about a link to those discussions - that would be helpful.
Comment #11
heyyo commentedI don't understand why the breadcrumb is not under the page title. In my opinion it should be in a nav inside content not in the header.
Comment #12
jensimmons commented