tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Anna “CyberTailor”" <cyber@sysrq.in>
To: tech@mandoc.bsd.lv
Subject: [PATCH 4/8] man_html: Add DPUB-ARIA roles to (sub)sections
Date: Tue, 21 Jun 2022 17:27:45 +0500	[thread overview]
Message-ID: <20220621122749.11417-5-cyber@sysrq.in> (raw)
In-Reply-To: <20220621122749.11417-1-cyber@sysrq.in>

---
 man_html.c                        | 5 ++++-
 regress/man/IP/literal.out_html   | 4 ++--
 regress/man/SH/paragraph.out_html | 4 ++--
 regress/man/SS/paragraph.out_html | 4 ++--
 regress/man/TP/vert.out_html      | 2 +-
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/man_html.c b/man_html.c
index 5f715cf0..ee3df208 100644
--- a/man_html.c
+++ b/man_html.c
@@ -322,7 +322,10 @@ man_SH_pre(MAN_ARGS)
 	switch (n->type) {
 	case ROFFT_BLOCK:
 		html_close_paragraph(h);
-		print_otag(h, TAG_SECTION, "c", class);
+		if (n->tok == MAN_SH)
+			print_otag(h, TAG_SECTION, "cr", class, "doc-part");
+		else
+			print_otag(h, TAG_SECTION, "cr", class, "doc-chapter");
 		break;
 	case ROFFT_HEAD:
 		print_otag_id(h, tag, class, n);
diff --git a/regress/man/IP/literal.out_html b/regress/man/IP/literal.out_html
index ceb26a56..caf883f4 100644
--- a/regress/man/IP/literal.out_html
+++ b/regress/man/IP/literal.out_html
@@ -17,7 +17,7 @@ text</pre>
 literal
 paragraph</pre>
 regular text
-<section class="Ss">
+<section class="Ss" role="doc-chapter">
 <h2 class="Ss" id="literal_into_indented_paragraph"><a class="permalink" href="#literal_into_indented_paragraph">literal
   into indented paragraph</a></h2>
 <p class="Pp">regular text</p>
@@ -33,7 +33,7 @@ text</pre>
 </dl>
 <p class="Pp">new regular paragraph</p>
 </section>
-<section class="Ss">
+<section class="Ss" role="doc-chapter">
 <h2 class="Ss" id="literal_out_of_indented_paragraph"><a class="permalink" href="#literal_out_of_indented_paragraph">literal
   out of indented paragraph</a></h2>
 <p class="Pp">regular text</p>
diff --git a/regress/man/SH/paragraph.out_html b/regress/man/SH/paragraph.out_html
index abe932b4..177b66a8 100644
--- a/regress/man/SH/paragraph.out_html
+++ b/regress/man/SH/paragraph.out_html
@@ -1,8 +1,8 @@
 </section>
-<section class="Sh">
+<section class="Sh" role="doc-part">
 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
 <p class="Pp">This text immediately follows a section header.</p>
 <p class="Pp">This is a paragraph.</p>
 </section>
-<section class="Sh">
+<section class="Sh" role="doc-part">
 <h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
diff --git a/regress/man/SS/paragraph.out_html b/regress/man/SS/paragraph.out_html
index 22591deb..b940af89 100644
--- a/regress/man/SS/paragraph.out_html
+++ b/regress/man/SS/paragraph.out_html
@@ -1,9 +1,9 @@
-<section class="Ss">
+<section class="Ss" role="doc-chapter">
 <h2 class="Ss" id="First_subsection"><a class="permalink" href="#First_subsection">First
   subsection</a></h2>
 <p class="Pp">This text immediately follows a subsection header.</p>
 <p class="Pp">This is a paragraph.</p>
 </section>
-<section class="Ss">
+<section class="Ss" role="doc-chapter">
 <h2 class="Ss" id="Second_subsection"><a class="permalink" href="#Second_subsection">Second
   subsection</a></h2>
diff --git a/regress/man/TP/vert.out_html b/regress/man/TP/vert.out_html
index 4499432b..551893b9 100644
--- a/regress/man/TP/vert.out_html
+++ b/regress/man/TP/vert.out_html
@@ -1,5 +1,5 @@
 </section>
-<section class="Sh">
+<section class="Sh" role="doc-part">
 <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
 <dl class="Bl-tag">
   <dt id="tag"><a class="permalink" href="#tag">tag</a></dt>
-- 
2.35.1

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


  parent reply	other threads:[~2022-06-21 12:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 12:27 [PATCH 0/8] Make generated HTML more accessible Anna “CyberTailor”
2022-06-21 12:27 ` [PATCH 1/8] mdoc_html: Accessibility markup for ToC Anna “CyberTailor”
2022-06-21 12:27 ` [PATCH 2/8] mdoc_html: Add DPUB-ARIA roles to sections Anna “CyberTailor”
2022-06-24 13:58   ` Ingo Schwarze
2022-06-21 12:27 ` [PATCH 3/8] mdoc_html: Add DPUB-ARIA roles to subsections Anna “CyberTailor”
2022-06-21 12:27 ` Anna “CyberTailor” [this message]
2022-06-21 12:27 ` [PATCH 5/8] man.cgi: add ARIA roles and semantics Anna “CyberTailor”
2022-07-04 16:37   ` Ingo Schwarze
2022-06-21 12:27 ` [PATCH 6/8] mdoc_html: Add accessible description to crosslinks Anna “CyberTailor”
2022-06-25 12:58   ` Ingo Schwarze
2022-06-21 12:27 ` [PATCH 7/8] mdoc_html: Tell screen readers to skip the header Anna “CyberTailor”
2022-06-26 15:51   ` Ingo Schwarze
2022-06-28 16:33     ` Anna “CyberTailor”
2022-06-21 12:27 ` [PATCH 8/8] man_html: " Anna “CyberTailor”
2022-06-22 19:15 ` [PATCH 0/8] Make generated HTML more accessible Ingo Schwarze
2022-06-22 19:40   ` Anna “CyberTailor”
2022-06-23 13:34     ` Ingo Schwarze

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=20220621122749.11417-5-cyber@sysrq.in \
    --to=cyber@sysrq.in \
    --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).