Skip to content

Commit 52d6a06

Browse files
authored
Add grouping section (#27)
* Add note about `hgroup` * Add grouping section * Link to Grouping in the ToC * Minor version bump * Rebuild docs
1 parent 5023be3 commit 52d6a06

File tree

5 files changed

+69
-1
lines changed

5 files changed

+69
-1
lines changed

docs/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ <h2 id="title-table-of-contents">Table of Contents</h2>
2828

2929
<ol>
3030
<li><a href="#section-about">About</a></li>
31+
<li><a href="#section-grouping">Grouping</a></li>
3132
<li><a href="#section-headings">Headings</a></li>
3233
<li><a href="#section-text-level">Text-level</a>
3334
<ol>
@@ -146,6 +147,7 @@ <h2 id="notes-headings">Notes:</h2>
146147
<ul>
147148
<li><small>Ensure that headings create a logical order. Apply <abbr="Cascading Style Sheets">CSS</abbr> classes to control visual presentation (e.g. <code translate="no">&lt;h2 class=&quot;type-size-medium color-blue-dark&quot;&gt;Our services&lt;/h2&gt;</code> ).</small></li>
148149
<li><small><code translate="no">role="doc-subtitle"</code> is used to alternate title for the work, but still has limited support.</small></li>
150+
<li><small>Use of <code translate="no">&lt;hgroup&gt;</code></small> is considered an antipattern, as it has <a rel="external noopener" href="https://www.tpgi.com/subheadings-subtitles-alternative-titles-and-taglines-in-html/">low to no, or unpredictable support with assistive technology</a>.</li>
149151
</ul>
150152
</section><!-- End of #section-headings -->
151153

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "accessible-html-content-patterns",
33
"description": "A collection of the full HTML5 Doctor Element Index as well as common markup patterns for quick reference.",
44
"homepage": "https://github.com/ericwbailey/accessible-html-content-patterns",
5-
"version": "2.0.10",
5+
"version": "2.1.0",
66
"license": "MIT",
77
"author": "Eric Bailey <[email protected]> (http://ericwbailey.website/)",
88
"contributors": [

partials/section.grouping.hbs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!-- Start of #section-grouping -->
2+
<section id="section-grouping" aria-labelledby="title-grouping">
3+
<h2 id="title-grouping">Grouping</h2>
4+
5+
<address aria-labelledby="subsection-address">
6+
<h3 id="subsection-address">Address</h3>
7+
<p><cite>Represents the contact information for its enclosing section. If it is a child of the body element, then it applies to the document as a whole.</cite></p>
8+
<p><a rel="external noopener" href="https://html5doctor.com/the-address-element/">HTML5 Doctor prognosis of <code translate="no">&lt;address&gt;</code></a>.</p>
9+
</address>
10+
11+
<article aria-labelledby="subsection-article">
12+
<h3 id="subsection-article">Article</h3>
13+
<p><cite>Represents a section of a page that consists of a composition that forms an independent part of a document, page, or site.</cite></p>
14+
<p><a rel="external noopener" href="https://html5doctor.com/the-article-element/">HTML5 Doctor prognosis of <code translate="no">&lt;article&gt;</code></a>.</p>
15+
</article>
16+
17+
<aside aria-labelledby="subsection-aside">
18+
<h3 id="subsection-aside">Aside</h3>
19+
<p><cite>Represents a section of a page consisting of content that is tangentially related to the content around the <code translate="no">&lt;aside&gt;</code> element, and which could be considered separate from that content.</cite></p>
20+
<p><a rel="external noopener" href="https://html5doctor.com/aside-revisited/">HTML5 Doctor prognosis of <code translate="no">&lt;aside&gt;</code></a>.</p>
21+
</aside>
22+
23+
<footer aria-labelledby="subsection-footer">
24+
<h3 id="subsection-footer">Footer</h3>
25+
<p><cite>Represents the &ldquo;footer&rdquo; of a document or section of a document. The footer element typically contains metadata about its enclosing section, such as who wrote it, links to related documents, copyright data, etc.</cite></p>
26+
<p><a rel="external noopener" href="https://html5doctor.com/the-footer-element-update/">HTML5 Doctor prognosis of <code translate="no">&lt;footer&gt;</code></a>.</p>
27+
</footer>
28+
29+
<form aria-labelledby="subsection-form">
30+
<h3 id="subsection-form">Form</h3>
31+
<p><cite>The &ldquo;form&rdquo; element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing.</cite></p>
32+
</form>
33+
34+
<header aria-labelledby="subsection-header">
35+
<h3 id="subsection-header">Header</h3>
36+
<p><cite>Represents the &ldquo;header&rdquo; of a document or section of a document. The header element is typically used to group a set of <code translate="no">h1</code>–<code translate="no">h6</code> elements to mark up a page's title with its subtitle or tagline.</cite></p>
37+
<p><a rel="external noopener" href="https://html5doctor.com/the-header-element/">HTML5 Doctor prognosis of <code translate="no">&lt;header&gt;</code></a>.</p>
38+
</header>
39+
40+
<nav aria-labelledby="subsection-nav">
41+
<h3 id="subsection-nav">Nav</h3>
42+
<p><cite>Represents navigation for a document. The <code translate="no">&lt;nav&gt;</code> element is a section containing links to other documents or to parts within the current document.</cite></p>
43+
<p><a rel="external noopener" href="https://html5doctor.com/nav-element/">HTML5 Doctor prognosis of <code translate="no">&lt;nav&gt;</code></a>.</p>
44+
</nav>
45+
46+
<search aria-labelledby="subsection-search">
47+
<h3 id="subsection-search">Search</h3>
48+
<p><cite>A region that contains a collection of items and objects that, as a whole, combine to create a search facility.</cite></p>
49+
</search>
50+
51+
<section aria-labelledby="subsection-section">
52+
<h3 id="subsection-section">Section</h3>
53+
<p><cite>Represents a generic document or application section.</cite></p>
54+
<p><a rel="external noopener" href="https://html5doctor.com/the-section-element/">HTML5 Doctor prognosis of <code translate="no">&lt;section&gt;</code></a>.</p>
55+
</section>
56+
57+
<h2 id="notes-sections">Notes:</h2>
58+
<ul>
59+
<li><small><code translate="no">&lt;body&gt;</code> is intentionally left out, as it can only be declared once per document.</small></li>
60+
<li><small><code translate="no">&lt;main&gt;</code> is also intentionally left out, as <a rel="external noopener" href="https://adrianroselli.com/2015/09/use-only-one-main-on-a-page.html">best practice is to only declare it once per document</a>.</small></li>
61+
<li><small><code translate="no">aria-label</code> and <code translate="no">aria-labelledby</code> can be used to disambiguate landmarks when more than one is present. You may not need to do this <a rel="external noopener" href="https://adrianroselli.com/2024/06/maybe-dont-name-that-landmark.html">if only one landmark is present</a>.</small></li>
62+
<li><small><code translate="no">&lt;search&gt;</code>’s use may <a rel="external noopener" href="https://www.scottohara.me/blog/2023/03/24/search-element.html">require testing for support</a>.</small></li>
63+
</ul>
64+
</section><!-- End of #section-grouping -->

partials/section.headings.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@
4545
<ul>
4646
<li><small>Ensure that headings create a logical order. Apply <abbr="Cascading Style Sheets">CSS</abbr> classes to control visual presentation (e.g. <code translate="no">&lt;h2 class=&quot;type-size-medium color-blue-dark&quot;&gt;Our services&lt;/h2&gt;</code> ).</small></li>
4747
<li><small><code translate="no">role="doc-subtitle"</code> is used to alternate title for the work, but still has limited support.</small></li>
48+
<li><small>Use of <code translate="no">&lt;hgroup&gt;</code></small> is considered an antipattern, as it has <a rel="external noopener" href="https://www.tpgi.com/subheadings-subtitles-alternative-titles-and-taglines-in-html/">low to no, or unpredictable support with assistive technology</a>.</li>
4849
</ul>
4950
</section><!-- End of #section-headings -->

partials/section.table-of-contents.hbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<ol>
77
<li><a href="#section-about">About</a></li>
8+
<li><a href="#section-grouping">Grouping</a></li>
89
<li><a href="#section-headings">Headings</a></li>
910
<li><a href="#section-text-level">Text-level</a>
1011
<ol>

0 commit comments

Comments
 (0)