tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>
Cc: tech@mandoc.bsd.lv
Subject: Re: patch: avoid multiple <h1>
Date: Wed, 6 Jul 2022 18:34:27 +0200	[thread overview]
Message-ID: <YsW5kzds2wya8r20@asta-kit.de> (raw)
In-Reply-To: <20220706144020.hkwn7vrxadhtz3xu@mail.imca-cat.org>

Hi Lewis,

J. Lewis Muir wrote on Wed, Jul 06, 2022 at 09:40:20AM -0500:

> The MDN page at
> 
>   https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
> 
> seems to agree with you; in the "Usage notes" section, it says
> 
>   Use only one <h1> per page or view.  It should concisely describe the
>   overall purpose of the content.
> 
> and
> 
>   Using more than one <h1> is allowed by the HTML specification, but is
>   not considered a best practice.  Using only one <h1> is beneficial for
>   screen reader users.
> 
>   The HTML specification includes the concept of an outline formed
>   by the use of <section> elements.  If this were implemented it
>   would enable the use of multiple <h1> elements, giving user
>   agents--including screen readers--a way to understand that an <h1>
>   nested inside a defined section is a subheading.  This functionality
>   has never been implemented; therefore it is important to use your
>   headings to describe the outline of your document.

Thank you for that additional pointer, it's quite interesting and led me
to a few facts i did not yet know.

The most important takeaway probably is that what i committed is very
likely reasonable, as also confirmed by Anna.

One thing i didn't understand before following your pointer is that
wrapping <h1> inside nested <section> elements is particularly bad
because browsers do not support it.  What mandoc -T html did before
my commit wasn't quite as bad as that because at least all the <h1>
elements were on the same outline level, and all the headings on the
lower level used <h2>.

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv


      reply	other threads:[~2022-07-06 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 12:43 Ingo Schwarze
2022-07-06 13:15 ` Anna
2022-07-06 14:40   ` Ingo Schwarze
2022-07-06 15:34     ` Ingo Schwarze
2022-07-06 15:58     ` Ingo Schwarze
2022-07-06 14:40 ` J. Lewis Muir
2022-07-06 16:34   ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YsW5kzds2wya8r20@asta-kit.de \
    --to=schwarze@usta.de \
    --cc=jlmuir@imca-cat.org \
    --cc=tech@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).