From: Anna <cyber@sysrq.in>
To: Ingo Schwarze <schwarze@usta.de>
Cc: tech@mandoc.bsd.lv
Subject: Re: [PATCH 1/3] Wrap manual header in the "<header>" tag
Date: Wed, 6 Jul 2022 00:03:15 +0500 [thread overview]
Message-ID: <YsSK83McJSzva+d+@sysrq.in> (raw)
In-Reply-To: <YsSGslSchnslh4Tv@asta-kit.de>
On 2022-07-05 20:45, Ingo Schwarze wrote:
> Hi Anna,
>
> Anna wrote on Tue, Jul 05, 2022 at 09:15:48PM +0500:
>
> > Whatever works
>
> Not really... :-(
> I have seen that attitude result in terrible markup too often,
> and not only in HTML/CSS, but also in other markup languages
> like mdoc(7), man(7), roff(7), even LaTeX...
>
> So i would really like to select markup that makes sense semantically
> and is also generally considered as decent style.
>
> > (but then we need to keep class="head" for styles).
>
> Not necessarily. CSS can also select by other attributes.
> For example, mandoc.css already contains
>
> input[name=expr] { width: 25%; }
>
> Maybe we could do something like:
>
> table[role=doc-pageheader] { ... }
>
> Then again, maybe nothing much is wrong with keeping the class for
> backward compatibility, at least for some time.
>
> > 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
>
> Yes, i'm aware of that, and i have been wanting to move away from
> this abuse of <table> for several years but never came round to it.
>
> There is also this very old entry in the TODO file:
>
> - The tables used to render the three-part page headers actually force
> the width of the <body> to the max-width given for <html>.
> Not yet sure how to fix that...
> Observed by an Anonymous Coward on undeadly.org:
> http://undeadly.org/cgi?action=article&sid=20140925064244&pid=1
> loc * exist * algo ** size * imp ***
>
> That might possibly fix itself once we move away from <table>.
>
> In the context of your patches, i deliberately avoided bringing
> that up because i didn't want to cause a distraction from your work.
>
> Then again, since you bring it up, maybe we should fix this first.
> With a bit of luck, it might make assigning the proper ARIA
> role easier, too.
>
> So, which HTML element *should* we use instead of <table>?
> <header> would make sense from the semantic perspective but
> we already found out we cannot assign the doc-pageheader role to it.
> <section> seems clearly inappropriate.
> That leaves me more or less with <div>, but that is very weak
> semantically...
<header> is just <div> with default role, so there's nothing wrong in
using <div>.
> And then the second question is how to style it.
> Do you think flexbox is the right CSS tool,
> or is there something that might fit better?
I thought about flexbox too, it is the right tool.
> Right now, the best i can come up with is
>
> <header role="group"> /* or without this if the validator complains again */
> <div role="doc-pageheader" aria-label="manual header line">
> <span>CHMOD(1)</span>
> <span>General Commands Manual</span>
> <span>CHMOD(1)</span>
> </div>
> </header>
Maybe drop <header>. And leave classes for backwards compatibility with
user CSS.
> div[role=doc-pageheader] {
> display: flex;
> justify-content: space-between;
> border-bottom: 1px dotted #808080;
> margin-bottom: 1em;
> font-size: smaller; }
>
> Not tested yet! Do you have a better idea, or should i develop
> a patch for that, test it, and commit it if it works?
I have no better ideas.
> Yours,
> Ingo
--
To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv
next prev parent reply other threads:[~2022-07-05 19:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 18:18 [PATCH 0/3] Add HTML landmarks Anna Vyalkova
2022-06-28 18:18 ` [PATCH 1/3] Wrap manual header in the "<header>" tag Anna Vyalkova
2022-07-03 17:24 ` Ingo Schwarze
2022-07-03 18:49 ` Anna Vyalkova
2022-07-03 20:12 ` Ingo Schwarze
2022-07-03 20:51 ` Anna “CyberTailor”
2022-07-05 15:16 ` Ingo Schwarze
2022-07-05 16:15 ` Anna
2022-07-05 18:45 ` Ingo Schwarze
2022-07-05 19:03 ` Anna [this message]
2022-07-05 21:39 ` Ingo Schwarze
2022-06-28 18:18 ` [PATCH 2/3] Wrap manual text in the "<main>" tag Anna Vyalkova
2022-07-03 14:41 ` Ingo Schwarze
2022-06-28 18:18 ` [PATCH 3/3] Wrap manual footer in the "<footer>" tag Anna Vyalkova
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=YsSK83McJSzva+d+@sysrq.in \
--to=cyber@sysrq.in \
--cc=schwarze@usta.de \
--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).