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.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 4664 invoked from network); 5 Jul 2022 16:15:59 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 5 Jul 2022 16:15:59 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 4b99adb2 for ; Tue, 5 Jul 2022 11:15:57 -0500 (EST) Received: from sysrq.in (sysrq.in [37.79.202.136]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 248decb7 for ; Tue, 5 Jul 2022 11:15:56 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysrq.in; s=sysrq.in; t=1657037750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=1JgcLSo578QhUNfjTIeyzud9kysqSo7UCuFpZfRbzZ8=; b=gAzcsFZdWzY6B71ory5wrT3MhCvxO6SrIpgWE64E+iMkKAlTdjxyl6jew3KIIbFiBnd+5q iIQ2KrD4+DfKfqL54uEWcNf7O+ol4jZ/wQwx/rHNlNIUJPRW9ylaWkds18JBZ1Rh3CI1E8 +rsTT69DuT+j74LfvZGJfo1c2bWQpilzngQ6L2gA1r9TG1ayM2gDjWFRrYPPGyWyX3Zvkt d8Cv42D+yFTm1eo1Zb907eH5tyb4pTSILUt9VCyOD5NnaaRwcoHGBxOqAin7ZkmWcG14hg 3AdxnVYukhwdii8IR2YkazRXNd4nQYr6jieUTtdMpiI/eD0NXJe2C1f6XZcd0w== Received: from sysrq.in (localhost [127.0.0.1]) by sysrq.in (OpenSMTPD) with ESMTPSA id d88371be (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 5 Jul 2022 16:15:50 +0000 (UTC) Date: Tue, 5 Jul 2022 21:15:48 +0500 From: Anna To: Ingo Schwarze Cc: tech@mandoc.bsd.lv Subject: Re: [PATCH 1/3] Wrap manual header in the "
" tag Message-ID: References: <20220628181844.15484-1-cyber@sysrq.in> <20220628181844.15484-2-cyber@sysrq.in> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Autocrypt: addr=cyber@sysrq.in; prefer-encrypt=mutual; keydata= mDMEYIFqhRYJKwYBBAHaRw8BAQdAmXuImZ3E4FYSZevE6xmeyqwBedA5TL3F0mA4nM8Jv5C0J0F ubmEg4oCcQ3liZXJUYWlsb3LigJ0gPGN5YmVyQHN5c3JxLmluPoiQBBMWCAA4FiEERA3R5VXjf5 x8ewz7f6gU36rhAzoFAmCBaoUCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQf6gU36rhA zoeCwD/UbmIjoaPHgxAubn/yoHbqtix0p1W8BwVdZSBinqtoc8BAMX19adz5Zx71lYFinFG7Yav D4E0jClMEfnYJH2TeG4HuDgEYIFqhRIKKwYBBAGXVQEFAQEHQGL1LYMPZDabnCTPEuyg5QgIlnU bKBqoPjp5sNidRZJXAwEIB4h4BBgWCAAgFiEERA3R5VXjf5x8ewz7f6gU36rhAzoFAmCBaoUCGw wACgkQf6gU36rhAzpFxwD/Z0QQGqLgBcafYUcHmzYcYxuyazuKWIn3H6OkeFUYtTgBAJmK2E+Yo mSMc0Ds93+yNQU0KhN1Ipyp9PiLDSSm8Z4B User-Agent: Mutt/2.2.6 (2022-06-05) On 2022-07-05 17:16, Ingo Schwarze wrote: > > Yes, there's no such requirement. I misinterpreted it. So wrapping the > > form in
is fine. > > Done. In addition, i also committed another patch to move > the

site header typically contained in header.html > into the
. > > > Next, i drafted a patch to use
for the manual header line, > but it does not work, and i feel a bit at a loss now. The version > of the patch appended below (also installed on man.bsd.lv for > testing) is deliberately inconsistent to demonstrate two ways > of writing the
. > > For manuals in man(7) format, the patch implements the original idea, > so for example, https://man.bsd.lv/cvs.1 contains: > >
> > > > > > >
CVS(1)General Commands ManualCVS(1)
>
> > But that is invalid code, see > > https://validator.w3.org/nu/?doc=https%3A%2F%2Fman.bsd.lv%2Fcvs.1 > > Error: Bad value doc-pageheader for attribute role on element header. > From line 171, column 1; to line 171, column 62 > > And indeed, https://www.w3.org/TR/html-aria/#docconformance says: > > HTML element:
> ARIA roles which MAY be used: group, none or presentation. Same with footer. > So we must not use doc-pageheader on
. > > My next attempt was to move the ARIA information from the
> to the contained . For demonstration, i implemented that > for manuals in mdoc(7) format. For example, https://man.bsd.lv/true.1 > contains: > >
>
> > > > > >
TRUE(1)General Commands ManualTRUE(1)
>
> > But the validator complains anyway: > > https://validator.w3.org/nu/?doc=https%3A%2F%2Fman.bsd.lv%2Ftrue.1 > > Error: Bad value doc-pageheader for attribute role on element table. > From line 172, column 1; to line 172, column 61 > > I have no idea why; https://www.w3.org/TR/html-aria/#docconformance says: > > HTML element: > ARIA roles which MAY be used: Any role > > The section https://www.w3.org/TR/html-aria/#allowed-descendants-of-aria-roles > does not appear to restrict the content of an element of role="group"; > it allows any flow content. I don't see anything > in https://www.w3.org/TR/dpub-aria-1.1/#doc-pageheader either > that might be violated. > > Do you have an idea what might be wrong here, or how we could fix it? > > If you have no idea either, i might just drop the
element > around the manual header line, like this: > > [...] > >
>
>
> > > > > >
TRUE(1)General Commands ManualTRUE(1)
>
>
> [...] > > That looks syntactically and semantically correct to me, > and the validator doesn't complain about it either. Whatever works (but then we need to keep class="head" for styles). While we're at this, can we use something other than tables for pageheader/pagefooter layout? https://git.sr.ht/~devinprater/fossability/tree/master/item/user%20interface%20and%20experience/web.md#html > Yours, > Ingo > > > Index: html.c > =================================================================== > RCS file: /cvs/src/usr.bin/mandoc/html.c,v > retrieving revision 1.148 > diff -u -p -r1.148 html.c > --- html.c 3 Jul 2022 14:28:26 -0000 1.148 > +++ html.c 5 Jul 2022 14:06:10 -0000 > @@ -1,7 +1,7 @@ > /* $OpenBSD: html.c,v 1.148 2022/07/03 14:28:26 schwarze Exp $ */ > /* > + * Copyright (c) 2011-2015, 2017-2022 Ingo Schwarze > * 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 > @@ -66,10 +66,12 @@ static const struct htmldata htmltags[TA > {"style", HTML_NLALL | HTML_INDENT}, > {"title", HTML_NLAROUND}, > {"body", HTML_NLALL}, > + {"header", HTML_NLALL}, > {"main", HTML_NLALL}, > {"div", HTML_NLAROUND}, > {"section", HTML_NLALL}, > {"nav", HTML_NLALL}, > + {"footer", HTML_NLALL}, > {"table", HTML_NLALL | HTML_INDENT}, > {"tr", HTML_NLALL | HTML_INDENT}, > {"td", HTML_NLAROUND}, > Index: html.h > =================================================================== > RCS file: /cvs/src/usr.bin/mandoc/html.h,v > retrieving revision 1.73 > diff -u -p -r1.73 html.h > --- html.h 3 Jul 2022 14:28:27 -0000 1.73 > +++ html.h 5 Jul 2022 14:06:10 -0000 > @@ -2,6 +2,7 @@ > /* > * Copyright (c) 2017, 2018, 2019, 2020 Ingo Schwarze > * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons > + * 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 > @@ -27,10 +28,12 @@ enum htmltag { > TAG_STYLE, > TAG_TITLE, > TAG_BODY, > + TAG_HEADER, > TAG_MAIN, > TAG_DIV, > TAG_SECTION, > TAG_NAV, > + TAG_FOOTER, > TAG_TABLE, > TAG_TR, > TAG_TD, > Index: man_html.c > =================================================================== > RCS file: /cvs/src/usr.bin/mandoc/man_html.c,v > retrieving revision 1.134 > diff -u -p -r1.134 man_html.c > --- man_html.c 4 Jul 2022 14:37:14 -0000 1.134 > +++ man_html.c 5 Jul 2022 14:06:10 -0000 > @@ -1,7 +1,8 @@ > /* $OpenBSD: man_html.c,v 1.134 2022/07/04 14:37:14 schwarze Exp $ */ > /* > - * Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze > + * Copyright (c) 2013-2015,2017-2020,2022 Ingo Schwarze > * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons > + * 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 > @@ -268,7 +269,9 @@ man_root_pre(const struct roff_meta *man > assert(man->msec); > mandoc_asprintf(&title, "%s(%s)", man->title, man->msec); > > - t = print_otag(h, TAG_TABLE, "c", "head"); > + t = print_otag(h, TAG_HEADER, "r?", "doc-pageheader", > + "aria-label", "manual header line"); > + print_otag(h, TAG_TABLE, "c", "head"); > tt = print_otag(h, TAG_TR, ""); > > print_otag(h, TAG_TD, "c", "head-ltitle"); > @@ -291,7 +294,9 @@ man_root_post(const struct roff_meta *ma > { > struct tag *t, *tt; > > - t = print_otag(h, TAG_TABLE, "c", "foot"); > + t = print_otag(h, TAG_FOOTER, "r?", "doc-pagefooter", > + "aria-label", "manual footer line"); > + print_otag(h, TAG_TABLE, "c", "foot"); > tt = print_otag(h, TAG_TR, ""); > > print_otag(h, TAG_TD, "c", "foot-date"); > Index: mandoc.css > =================================================================== > RCS file: /cvs/src/usr.bin/mandoc/mandoc.css,v > retrieving revision 1.37 > diff -u -p -r1.37 mandoc.css > --- mandoc.css 3 Jul 2022 14:28:27 -0000 1.37 > +++ mandoc.css 5 Jul 2022 14:06:10 -0000 > @@ -53,7 +53,8 @@ table.results { margin-top: 1em; > > /* Header and footer lines. */ > > -table.head { width: 100%; > +header > table { > + width: 100%; > border-bottom: 1px dotted #808080; > margin-bottom: 1em; > font-size: smaller; } > @@ -61,7 +62,8 @@ td.head-vol { text-align: center; } > td.head-rtitle { > text-align: right; } > > -table.foot { width: 100%; > +footer > table { > + width: 100%; > border-top: 1px dotted #808080; > margin-top: 1em; > font-size: smaller; } > Index: mdoc_html.c > =================================================================== > RCS file: /cvs/src/usr.bin/mandoc/mdoc_html.c,v > retrieving revision 1.221 > diff -u -p -r1.221 mdoc_html.c > --- mdoc_html.c 4 Jul 2022 14:37:14 -0000 1.221 > +++ mdoc_html.c 5 Jul 2022 14:06:10 -0000 > @@ -453,7 +453,9 @@ mdoc_root_post(const struct roff_meta *m > { > struct tag *t, *tt; > > - t = print_otag(h, TAG_TABLE, "c", "foot"); > + t = print_otag(h, TAG_FOOTER, "r", "group"); > + print_otag(h, TAG_TABLE, "r?", "doc-pagefooter", > + "aria-label", "manual footer line"); > tt = print_otag(h, TAG_TR, ""); > > print_otag(h, TAG_TD, "c", "foot-date"); > @@ -483,7 +485,9 @@ mdoc_root_pre(const struct roff_meta *me > mandoc_asprintf(&title, "%s(%s)", > meta->title, meta->msec); > > - t = print_otag(h, TAG_TABLE, "c", "head"); > + t = print_otag(h, TAG_HEADER, "r", "group"); > + print_otag(h, TAG_TABLE, "r?", "doc-pageheader", > + "aria-label", "manual header line"); > tt = print_otag(h, TAG_TR, ""); > > print_otag(h, TAG_TD, "c", "head-ltitle"); -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv