Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

Why should we not skip levels (eg from H1 to H3)

Reply with quote
Johan007 wrote:
I agree it is a step in the right direction however if...
Code:
<h1>MTB102, Summer 2004 and D DAY 60. A Trip in the Life Of 102.</h1>
...had subtitles would you give those subtitles H2's t he same as your navigation or more H1?!

Bylines on headings are a bit of a nightmare in HTML Smile I assume that's what you mean? Personally, I'd include it in the h1, if it's part of the same block of text as the headline, but maybe mark it up with <span class="byline"> or <span id="byline">.

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.

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
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).

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
eatyourgreens wrote:
Bylines on headings are a bit of a nightmare in HTML Smile I assume that's what you mean?
No. If you wanted to add two new section to your article on that page what heading number would you give it to help split it up? This would not be a structural label. For example I want to write about cars but after the intro text I want to write a small section about the driving experience and another section about running costs.

Johan De Silva / Portfolio
Reply with quote
Johan007 wrote:
eatyourgreens wrote:
Bylines on headings are a bit of a nightmare in HTML Smile I assume that's what you mean?
No. If you wanted to add two new section to your article on that page what heading number would you give it to help split it up? This would not be a structural label. For example I want to write about cars but after the intro text I want to write a small section about the driving experience and another section about running costs.

Oh, right. This should do it, I think:
h1 - Cars
h2 - introduction
h2 - the driving experience
h2 - running costs

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote To sum up where I think we are:
  • 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.
  • 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.
Being consistent throughout the website is, as ever, the most important thing. Following a section-based interpretation as much as possible is the best bet for providing users (and user agents) with an easily understandable document outline. But a strict interpretation of this might not play well with other factors all the time.

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
Reply with quote 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.:
Code:
<header>
 <h1>Freddie Starr ate my hamster!</h1>
 <h2>Shocking revelations and lewd insinuations by our roving reporter!</h2>
</header>
...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
Reply with quote
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?
Reply with quote Did you click through to the mailing list discussion?

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
Confused

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote 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.

phiger wrote:
from: http://www.w3.org/QA/Tips/Use_h1_for_Title

So top level doesn't necessarily mean first 'encountered' heading?
...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
Reply with quote
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.
If you were to generate a table of contents of the document, using the headings, what would it look like when you "skipped" heading levels or didn't start with a H1 (but used H1 later on)?

Simon Pieters
Reply with quote
Johan007 wrote:

phiger wrote:

from: http://www.w3.org/QA/Tips/Use_h1_for_Title

So top level doesn't necessarily mean first 'encountered' heading?
...not actually said in WCAG 3.5 Document Headers but obviously I agree with your w3c link regarding headers that all documents should contain the <h1> similar to the contents of the <title>.


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
Reply with quote 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
Reply with quote
zcorpan wrote:
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.
If you were to generate a table of contents of the document, using the headings, what would it look like when you "skipped" heading levels or didn't start with a H1 (but used H1 later on)?


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

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens
Reply with quote
eatyourgreens wrote:
Something like

- main navigation heading
- secondary navigation heading
Page content heading
- subsection heading
- subsection heading
What are the first two sub-sections of? An implied section with no heading? That doesn't make any sense to me.

Simon Pieters
Reply with quote
zcorpan wrote:
eatyourgreens wrote:
Something like

- main navigation heading
- secondary navigation heading
Page content heading
- subsection heading
- subsection heading
What are the first two sub-sections of? An implied section with no heading? That doesn't make any sense to me.

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?

Jim O'Donnell
work: Royal Observatory Greenwich
play: eatyourgreens

Display posts from previous:   

Page 4 of 5

Goto page Previous  1, 2, 3, 4, 5  Next

All times are GMT

  • Reply to topic
  • Post new topic