From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5312 invoked from network); 3 Jul 2022 14:30:18 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 3 Jul 2022 14:30:18 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 9430c601 for ; Sun, 3 Jul 2022 09:30:15 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 3ac9abc1 for ; Sun, 3 Jul 2022 09:30:15 -0500 (EST) Date: Sun, 3 Jul 2022 09:30:15 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Instead of the custom
, use the X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <33662ebe56b79a5e@mandoc.bsd.lv> Log Message: ----------- Instead of the custom
, use the standard HTML
element. The benefit is that it has the ARIA landmark role "main" by default. To ease the transition for people using their own CSS file instead of mandoc.css, retain the custom class for now. I had this idea in a discussion with Anna Vyalkova . Patch from Anna, slightly tweaked by me. Modified Files: -------------- mandoc: html.c html.h man_html.c mandoc.css mdoc_html.c Revision Data ------------- Index: mandoc.css =================================================================== RCS file: /home/cvs/mandoc/mandoc/mandoc.css,v retrieving revision 1.49 retrieving revision 1.50 diff -Lmandoc.css -Lmandoc.css -u -p -r1.49 -r1.50 --- mandoc.css +++ mandoc.css @@ -69,8 +69,7 @@ td.foot-os { text-align: right; } /* Sections and paragraphs. */ -.manual-text { - margin-left: 3.8em; } +main { margin-left: 3.8em; } .Nd { } section.Sh { } h1.Sh { margin-top: 1.2em; @@ -338,8 +337,7 @@ h1.Sh::before, h2.Ss::before, .St::befor /* Overrides to avoid excessive margins on small devices. */ @media (max-width: 37.5em) { -.manual-text { - margin-left: 0.5em; } +main { margin-left: 0.5em; } h1.Sh, h2.Ss { margin-left: 0em; } .Bd-indent { margin-left: 2em; } .Bl-hang > dd { Index: html.h =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.h,v retrieving revision 1.110 retrieving revision 1.111 diff -Lhtml.h -Lhtml.h -u -p -r1.110 -r1.111 --- html.h +++ html.h @@ -27,6 +27,7 @@ enum htmltag { TAG_STYLE, TAG_TITLE, TAG_BODY, + TAG_MAIN, TAG_DIV, TAG_SECTION, TAG_NAV, Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v retrieving revision 1.344 retrieving revision 1.345 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.344 -r1.345 --- mdoc_html.c +++ mdoc_html.c @@ -302,7 +302,7 @@ html_mdoc(void *arg, const struct roff_m } mdoc_root_pre(mdoc, h); - t = print_otag(h, TAG_DIV, "c", "manual-text"); + t = print_otag(h, TAG_MAIN, "c", "manual-text"); print_mdoc_nodelist(mdoc, n, h); print_tagq(h, t); mdoc_root_post(mdoc, h); Index: man_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/man_html.c,v retrieving revision 1.179 retrieving revision 1.180 diff -Lman_html.c -Lman_html.c -u -p -r1.179 -r1.180 --- man_html.c +++ man_html.c @@ -132,7 +132,7 @@ html_man(void *arg, const struct roff_me } man_root_pre(man, h); - t = print_otag(h, TAG_DIV, "c", "manual-text"); + t = print_otag(h, TAG_MAIN, "c", "manual-text"); print_man_nodelist(man, n, h); print_tagq(h, t); man_root_post(man, h); Index: html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.c,v retrieving revision 1.276 retrieving revision 1.277 diff -Lhtml.c -Lhtml.c -u -p -r1.276 -r1.277 --- html.c +++ html.c @@ -2,6 +2,7 @@ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011-2015, 2017-2021 Ingo Schwarze + * Copyright (c) 2022 Anna Vyalkova * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -67,6 +68,7 @@ static const struct htmldata htmltags[TA {"style", HTML_NLALL | HTML_INDENT}, {"title", HTML_NLAROUND}, {"body", HTML_NLALL}, + {"main", HTML_NLALL}, {"div", HTML_NLAROUND}, {"section", HTML_NLALL}, {"nav", HTML_NLALL}, -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv