Why should we not skip levels (eg from H1 to H3)
| Johan007 wrote: | ||
I agree it is a step in the right direction however if...
|
Bylines on headings are a bit of a nightmare in HTML
The other option might be something like
| Quote: |
| <div id="headline">
<h1>Freddie Starr ate my hamster!</h1> <p id="byline">Shocking revelations and lewd insinuations by our roving reporter!</p> </div> |
I don't like using h2 there, as you're not really introducing a heading for something new - just continuing the heading for the main article.
| phiger wrote: |
|
Again.. i know it's all down to interpretation. But it's very annoying when questioned about this and people point to automated checkers and don't actually understand the 'real' issues and that is users. |
I know exactly what you mean. I've been in a similar situation - publically funded project, every page must be A or AA, and we'd get regular reports on pages which gave validation errors or errors in automated checkers. Of course, we'd fix those technical errors but it feels more like ticking boxes for the sake of bureaucracy than building a site which is actually usable by disabled people.
This is a seperate discussion, but what's missing at the moment is a useful set of metrics for adequately assessing the usability of web sites by assistive technologies. WCAG 2 anyone? (runs and hides).
| eatyourgreens wrote: |
| Bylines on headings are a bit of a nightmare in HTML |
Johan De Silva / Portfolio
| Johan007 wrote: | ||
|
Oh, right. This should do it, I think:
h1 - Cars
h2 - introduction
h2 - the driving experience
h2 - running costs
To sum up where I think we are:
So then, which is best? I don't know; maybe there isn't one.
Last edited by Ben Millard on 15 Mar 2007 03:43 pm; edited 1 time in total
- Zcorpan's comment about the document outline (aka "table of contents") follows a strictly section-based interpretation of the headings. In this interpretation, the numbers indicate a level in a hierarchy and not importance (except by coincidence).
This objective use of headings will be perfectly consistent throughout the website. It will even be quite consistent with other websites who follow these rules. Users get a reliable and logical (i.e. "sane") document outline.
The assumption here is either that W3C:- used the word "importance" for lack of a better way to describe the layering of heading levels, as suggested by terrence wood;
- or they were plain wrong to say headings indicate importance.
Are search engines sympathetic to this interpretation? If your main content doesn't start with <h1>, you might lose out a little. But they categorise pages with no headings just fine (i.e. most of the web), so you can't be losing much. - used the word "importance" for lack of a better way to describe the layering of heading levels, as suggested by terrence wood;
- A loosely section-based interpretation uses headings sequentially for the most part. The number generally indicates the depth they would be at when using a strictly section-based interpretation.
The looseness comes when factors outside logical purity are given priority. For example, attempts to optimise rankings in search engines by reserving the first <h1> for the main content, even if other headings precede it.
- Johan's idea is for a quirky section-based interpretation. This matches the loosely section-based interpretation except for some intentional quirkyness.
For example, only using very low headings before the first <h1>. Or perhaps reserving a little-used heading level for some specific section of the page, such as an embedded search facility.
- A presentationally section-based interpretation will decide which heading to use largely by their default appearance. Headings are still being used to introduce sections, but only sections in the main content and not in a perfectly sequential manner.
The main content would tend to start with <h2> and sub-sections with <h4>. Sections below this would tend to use <p> as the heading. Any "structural labels" for non-content sections would be marked up as <p> (or even <td>!).
In my experience, this is the most common interpretation although it is usually not held strongly.
- A strictly importance-based interpretation would make no attempt to use headings sequentially.
Importance is a matter of perspective, so headings done this way will be unpredictable for the end user. Different content authors may use them differently even in the same website. This extreme inconsistency would likely be confusing for users.
So then, which is best? I don't know; maybe there isn't one.
Last edited by Ben Millard on 15 Mar 2007 03:43 pm; edited 1 time in total
Good summary Ben.
I also want to point out that if you'd use HTML5's new sectioning elements (namely <section>, <nav>, <article>, <aside>) correctly, then the document outline will be the same regardless of how you use the numbers in <h1>-<h6>. Thus people can continue to use whatever theory they like about the heading numbers, and still be correct. You can even use <h1> for all your headings if you want. (That wouldn't degrade nicely in legacy UAs though...)
HTML5 also solves the subheading problem by introducing a <header> element, so that you can use e.g.:
...where only "Freddie Starr ate my hamster!" would be part of the document outline (the H2 doesn't start a new implied section, it's just a subheading of the same section).
http://www.whatwg.org/specs/web-apps/current-work/#headings
Simon Pieters
I also want to point out that if you'd use HTML5's new sectioning elements (namely <section>, <nav>, <article>, <aside>) correctly, then the document outline will be the same regardless of how you use the numbers in <h1>-<h6>. Thus people can continue to use whatever theory they like about the heading numbers, and still be correct. You can even use <h1> for all your headings if you want. (That wouldn't degrade nicely in legacy UAs though...)
HTML5 also solves the subheading problem by introducing a <header> element, so that you can use e.g.:
| Code: |
| <header>
<h1>Freddie Starr ate my hamster!</h1> <h2>Shocking revelations and lewd insinuations by our roving reporter!</h2> </header> |
http://www.whatwg.org/specs/web-apps/current-work/#headings
Simon Pieters
| Johan007 wrote: |
| .. documents do not need to start with a <H1>. For other reasons (Google, JAWS etc...) they should arguably start with <H1> to identify content start. |
from: http://www.w3.org/QA/Tips/Use_h1_for_Title
| Quote: |
|
Use <h1> for top-level heading <h1> is the HTML element for the first-level heading of a document |
So top level doesn't necessarily mean first 'encountered' heading?
Did you click through to the mailing list discussion?
http://lists.w3.org/Archives/Public/www-qa/2001Sep/0019.html
| Quote: |
| In a system of scopes that is in a form simple
enought for the user to remember as the navigate the page and rich enough to represent what the author has to say, some tree levels may be non-notional and some of the notional scopes may overlap and hence come from outside the pure tree. |
http://lists.w3.org/Archives/Public/www-qa/2001Sep/0019.html
Cerbera summary is excellent. I am open to change my mind and have done so many times in thread however I think I am going to remain bias to the quirky section-based model as no one has actually shown me a real world problem with missing headings.
...not actually said in WCAG 3.5 Document Headers but obviously I agree with the w3c link regarding headers that all documents should contain the <h1> similar to the contents of the <title>.
Johan De Silva / Portfolio
| phiger wrote: |
| from: http://www.w3.org/QA/Tips/Use_h1_for_Title
So top level doesn't necessarily mean first 'encountered' heading? |
Johan De Silva / Portfolio
| Johan007 wrote: |
| Cerbera summary is excellent. I am open to change my mind and have done so many times in thread however I think I am going to remain bias to the quirky section-based model as no one has actually shown me a real world problem with missing headings. |
Simon Pieters
| Johan007 wrote: | ||
|
http://www.w3.org/TR/WCAG10-HTML-TECHS/#document-headers
page states:
| Quote: |
|
For example, in HTML, H2 elements should follow H1 elements, H3 elements should follow H2 elements, etc |
So:
| Code: |
|
<h2>Some info</h2> <h3>Heading 3</h3> <h1>main content title</h1> <h2>heading 2</h2> |
Is incorrect?
As i said before, my management is asking advice on where we comply with the AA guidelines. This is the only sticking point I have - providing an interpretation of this checkpoint is proving difficult.
I know at the end of the day it all comes down to 'an interpretation' and the WAI guidelines tripartite approach is flawed as it relies on not only content authors to adhere, but also Web content authoring tools and browser to each comply with their relevant guidelines..etc
You shouldn't skip them but can start at H2 if you want.
Always good fun to read: https://www.cs.tcd.ie/15445/UG.HTML#H1
};-) http://www.xhtmlcoder.com/
WVYFC chose the Yorkshire Air Ambulance as the main charity to fund raise for in 2006
Always good fun to read: https://www.cs.tcd.ie/15445/UG.HTML#H1
};-) http://www.xhtmlcoder.com/
WVYFC chose the Yorkshire Air Ambulance as the main charity to fund raise for in 2006
| zcorpan wrote: | ||
|
Something like
- main navigation heading
- secondary navigation heading
Page content heading
- subsection heading
- subsection heading
I imagine, where you can skip straight past the navigation by jumping directly to h1. Which I'd be happy with unless it causes some sort of barrier to access. If it makes the page easier to navigate in a screenreader, then I'm all for it.
Slightly related - here's a page on our site where I use the contents of h2 to dynamically generate a table of contents in order to skip through a long page. h3 and h4 are ignored by the function that creates the <ul>.
http://www.nmm.ac.uk/collections/nelson/about.cfm
| eatyourgreens wrote: |
| Something like
- main navigation heading - secondary navigation heading Page content heading - subsection heading - subsection heading |
Simon Pieters
| zcorpan wrote: | ||
|
No offence, but that doesn't matter if we're talking about documents that don't fit a single hierarchical structure. The question is, can the headings be easily navigated with a screenreader, or easily interpreted by a search engine bot?



