From: Anna Vyalkova <cyber@sysrq.in>
To: tech@mandoc.bsd.lv
Subject: [PATCH 2/2] HTML: mark some tables as used for layout only
Date: Sun, 17 Jul 2022 12:37:13 +0500 [thread overview]
Message-ID: <20220717073713.18314-2-cyber@sysrq.in> (raw)
In-Reply-To: <20220717073713.18314-1-cyber@sysrq.in>
---
cgi.c | 3 ++-
man_html.c | 2 +-
mandoc.css | 1 +
mdoc_html.c | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cgi.c b/cgi.c
index 79f80ffe..c4e46f59 100644
--- a/cgi.c
+++ b/cgi.c
@@ -728,7 +728,8 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz)
if (sz > 1) {
puts("<nav lang=\"\">");
- puts("<table class=\"results\">");
+ puts("<table class=\"results\" role=\"presentation\">");
+ puts("<caption><strong>Search results</strong></caption>");
for (i = 0; i < sz; i++) {
printf(" <tr>\n"
" <td lang=\"en\">"
diff --git a/man_html.c b/man_html.c
index fe5f3ea6..1b073736 100644
--- a/man_html.c
+++ b/man_html.c
@@ -595,7 +595,7 @@ man_SY_pre(MAN_ARGS)
switch (n->type) {
case ROFFT_BLOCK:
html_close_paragraph(h);
- print_otag(h, TAG_TABLE, "c", "Nm");
+ print_otag(h, TAG_TABLE, "cr", "Nm", "presentation");
print_otag(h, TAG_TR, "");
break;
case ROFFT_HEAD:
diff --git a/mandoc.css b/mandoc.css
index fff17159..0aec155b 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -20,6 +20,7 @@ h1, h2 { font-size: 110%; }
table { margin-top: 0em;
margin-bottom: 0em;
border-collapse: collapse; }
+caption { text-align: left; }
/* Some browsers set border-color in a browser style for tbody,
* but not for table, resulting in inconsistent border styling. */
tbody { border-color: inherit; }
diff --git a/mdoc_html.c b/mdoc_html.c
index fdf113cf..c72652ce 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -661,7 +661,7 @@ mdoc_nm_pre(MDOC_ARGS)
}
html_close_paragraph(h);
synopsis_pre(h, n);
- print_otag(h, TAG_TABLE, "c", "Nm");
+ print_otag(h, TAG_TABLE, "cr", "Nm", "presentation");
print_otag(h, TAG_TR, "");
return 1;
}
--
2.35.1
--
To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv
prev parent reply other threads:[~2022-07-17 7:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 7:37 [PATCH 1/2] HTML: Add "lang" attributes Anna Vyalkova
2022-07-17 7:37 ` Anna Vyalkova [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=20220717073713.18314-2-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).