#
645bcdad |
| 25-Jan-2025 |
schwarze <schwarze@openbsd.org> |
Fix a violation of the HTML 5 standard (paragraph 4.5.6 "The cite element"). It is intended for titles, not to wrap complete citation blocks.
Found in a conversation with job@ and tb@.
|
#
61a57034 |
| 24-Jan-2025 |
schwarze <schwarze@openbsd.org> |
Formatting of the .%T (title) macro needs some logic to adhere to traditional typographic conventions that are already implemented for terminal output: set titles of independent works (like books or
Formatting of the .%T (title) macro needs some logic to adhere to traditional typographic conventions that are already implemented for terminal output: set titles of independent works (like books or RFCs) in italic and of parts of larger works (like journal articles) in quotation marks and roman font. Do that in HTML output, too.
OK job@ (without the regress parts), and tb@ appears to agree with the general direction
show more ...
|
#
0aa8d661 |
| 19-Jan-2025 |
schwarze <schwarze@openbsd.org> |
In "-T html" output, translate ".%R RFC <nuber>" to a hyperlink to rfc-editor.org.
New feature first requested by tb@ in March 2023, now reminded by sthen@. Patch tested by and OK tb@.
|
#
f0f927fc |
| 06-Jul-2022 |
schwarze <schwarze@openbsd.org> |
https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/ says: "Start names with a capital letter; it helps some screen readers speak them with appropriate inflection." Anna Vyalkova already
https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/ says: "Start names with a capital letter; it helps some screen readers speak them with appropriate inflection." Anna Vyalkova already did that correctly when sending patches, but i ruined it when committing, so fix it now.
show more ...
|
#
93a46bdf |
| 06-Jul-2022 |
schwarze <schwarze@openbsd.org> |
assign the ARIA role "doc-subtitle" to the .Nd element; discussed with Anna Vyalkova <cyber at sysrq dot in>
|
#
00b92a3f |
| 06-Jul-2022 |
schwarze <schwarze@openbsd.org> |
While the HTML standard allows multiple <h1> elements in the same document, <h1> is intended for top level headers, and most of the sections in a manual page can hardly be considered top-level. It is
While the HTML standard allows multiple <h1> elements in the same document, <h1> is intended for top level headers, and most of the sections in a manual page can hardly be considered top-level. It is more usual to use <h1> only for the main title of the document of for the site name.
Consequently, move .Sh/.SH from <h1> to <h2> and .Ss/.SS from <h2> to <h3>, freeing <h1> for use by header.html in man.cgi(8).
Discussed with Anna Vyalkova <cyber at sysrq dot in>.
show more ...
|
#
8f48bc46 |
| 05-Jul-2022 |
schwarze <schwarze@openbsd.org> |
Finally get rid of the archaic <table> markup for header and footer lines and use flexbox CSS instead. Improve accessibility by adding role and aria-label attributes to these header and footer lines
Finally get rid of the archaic <table> markup for header and footer lines and use flexbox CSS instead. Improve accessibility by adding role and aria-label attributes to these header and footer lines. Using ideas from both Anna Vyalkova <cyber at sysrq dot in> and myself.
As a welcome side effect, this also resolves the long-standing issue that the rendering was always 65em wide, requiring horizontal scrolling when the window was narrower. Now, rendering nicely adapts to browser windows of arbitrary narrowness.
show more ...
|
#
501adfef |
| 04-Jul-2022 |
schwarze <schwarze@openbsd.org> |
Put the HTML comment containing the Copyright header (if any) between the <head> and the <body> rather than before the <head> because the <meta charset="utf-8"/> element ought to be within the first
Put the HTML comment containing the Copyright header (if any) between the <head> and the <body> rather than before the <head> because the <meta charset="utf-8"/> element ought to be within the first 1024 bytes of the HTML code. Issue found with validator.w3.org.
show more ...
|
#
6774f271 |
| 03-Jul-2022 |
schwarze <schwarze@openbsd.org> |
Instead of the custom <div class="manual-text">, use the standard HTML <main> element. The benefit is that it has the ARIA landmark role "main" by default. To ease the transition for people using t
Instead of the custom <div class="manual-text">, use the standard HTML <main> 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 <cyber at sysrq dot in>. Patch from Anna, slightly tweaked by me.
show more ...
|
#
b3005203 |
| 25-Jun-2022 |
schwarze <schwarze@openbsd.org> |
If an .Xr macro contains a section argument, write an aria-label attribute such that users of screen readers aren't forced to listen to lengthy and distracting readings like "mdoc, left parenthesis,
If an .Xr macro contains a section argument, write an aria-label attribute such that users of screen readers aren't forced to listen to lengthy and distracting readings like "mdoc, left parenthesis, 7, right parenthesis".
Based on a patch from Anna Vyalkova <cyber at sysrq dot in>, significantly tweaked by me.
show more ...
|
#
88e033f9 |
| 24-Jun-2022 |
schwarze <schwarze@openbsd.org> |
Improve accessibility of -T html -O toc output by using the <nav> element in the DPUB-ARIA doc-toc role. Patch from Anna Vyalkova <cyber at sysrq dot in> slightly tweaked by me.
This is hopefully th
Improve accessibility of -T html -O toc output by using the <nav> element in the DPUB-ARIA doc-toc role. Patch from Anna Vyalkova <cyber at sysrq dot in> slightly tweaked by me.
This is hopefully the start of a collaboration to improve accessibility of Unix manual pages using the WAI-ARIA, HTML-ARIA, and DPUB-ARIA standards. Progress appears to be possible without changing *anything* with respect to the way manual pages are written. Instead, it seems sufficient to properly translate semantic cues already implied by existing mdoc(7) markup into the appropriate HTML elements and ARIA attributes. Overall, the total length of HTML output is likely to increase slightly, but not much.
show more ...
|
#
4529325a |
| 30-Mar-2021 |
schwarze <schwarze@openbsd.org> |
In HTML output, correctly render .Bd -unfilled in proportionally-spaced font, rather than with the monospace font appropriate for .Bd -literal. This fixes a minibug reported by anton@.
Implemented b
In HTML output, correctly render .Bd -unfilled in proportionally-spaced font, rather than with the monospace font appropriate for .Bd -literal. This fixes a minibug reported by anton@.
Implemented by no longer relying on the typical browser default of "pre { font-family: monospace }" but instead letting <pre> elements inherit the font family from their parent, then adding an explicit CSS .Li class only for those displays where the manual page author requested it by using the -literal option on the .Bd macro.
show more ...
|
#
52e71e33 |
| 16-Oct-2020 |
schwarze <schwarze@openbsd.org> |
In HTML output, avoid printing a newline right after <pre> and right before </pre> because that resulted in vertical whitespace not requested by the manual page author.
Formatting bug reported by Am
In HTML output, avoid printing a newline right after <pre> and right before </pre> because that resulted in vertical whitespace not requested by the manual page author.
Formatting bug reported by Aman Verma <amanraoverma plus vim at gmail dot com> on discuss@.
show more ...
|
#
6e69d8cf |
| 19-Apr-2020 |
schwarze <schwarze@openbsd.org> |
Correctly handle non-unique tags even when NODE_ID and NODE_HREF fall apart, NODE_ID occurring earlier than NODE_HREF.
|
#
6e2a0df9 |
| 18-Apr-2020 |
schwarze <schwarze@openbsd.org> |
When a .Tg is attached to a paragraph, attach the permalink to the first word, or the first few words if they are short.
|
#
e053e0fd |
| 06-Apr-2020 |
schwarze <schwarze@openbsd.org> |
Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. In HTML output, improve the logic for writing inside permalinks: skip them when there is no child content or when there is a risk that the
Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. In HTML output, improve the logic for writing inside permalinks: skip them when there is no child content or when there is a risk that the children might contain flow content.
show more ...
|
#
ba1a6076 |
| 01-Apr-2020 |
schwarze <schwarze@openbsd.org> |
Just like we are already doing it in HTML output, automatically tag section and subsection headers in terminal output, too. Even though admittedly, commands like "/SEE" and "/ Subsec" work, too, t
Just like we are already doing it in HTML output, automatically tag section and subsection headers in terminal output, too. Even though admittedly, commands like "/SEE" and "/ Subsec" work, too, there is no downside, and besides, with the recent improvements in the tagging framework, implementation cost is negligible.
show more ...
|
#
0ac7e6ec |
| 13-Mar-2020 |
schwarze <schwarze@openbsd.org> |
Split tagging into a validation part including prioritization in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and
Split tagging into a validation part including prioritization in tag.{h,c} and {mdoc,man}_validate.c and into a formatting part including command line argument checking in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c.
Immediate functional benefits include: * Improved prioritization of automatic tags for .Em and .Sy. * Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged. * Explicit tagging of .Er and .Fl now works in HTML output. * Automatic tagging of .IP and .TP now works in HTML output. But mainly, this patch provides clean earth to build further improvements on.
Technical changes: * Main program: Write a tag file for ASCII and UTF-8 output only. * All formatters: There is no more need to delay writing the tags. * mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection. * HTML formatter: If available, use the "string" attribute as the tag. * HTML formatter: New function to write permalinks, to reduce code duplication.
Style cleanup in the vicinity while here: * mdoc(7) terminal formatter: To set up bold font for children, defer to termp_bold_pre() rather than calling term_fontpush() manually. * mdoc(7) terminal formatter: Garbage collect some duplicate functions. * mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions. * Where possible, use switch statements rather than if cascades. * Get rid of some more Yoda notation.
The necessity for such changes was first discussed with kn@, but i didn't bother him with a request to review the resulting -673/+782 line patch.
show more ...
|
#
66c5de26 |
| 27-Feb-2020 |
schwarze <schwarze@openbsd.org> |
The HTML standard does not allow self-closing syntax for non-void elements. Consequently, write an explicit end tag for <mark> elements.
|
#
7ebbefbe |
| 27-Feb-2020 |
schwarze <schwarze@openbsd.org> |
Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm a
Introduce the concept of nodes that are semantically transparent: they are skipped when looking for previous or following high-level macros. Examples include roff(7) .ft, .ll, and .ta, mdoc(7) .Sm and .Tg, and man(7) .DT and .PD. Use this concept for a variety of improved decisions in various validators and formatters.
While here, * remove a few const qualifiers on struct arguments that caused trouble; * get rid of some more Yoda notation in the vicinity; * and apply some other stylistic improvements in the vicinity.
I found this class of issues while considering .Tg patches from kn@.
show more ...
|
#
92929bf6 |
| 19-Jan-2020 |
schwarze <schwarze@openbsd.org> |
Introduce a new mdoc(7) macro .Tg ("tag") to explicitly mark a place as defining a term. Please only use it when automatic tagging does not work. Manual page authors will not be required to add the
Introduce a new mdoc(7) macro .Tg ("tag") to explicitly mark a place as defining a term. Please only use it when automatic tagging does not work. Manual page authors will not be required to add the new macro; using it remains optional. HTML output is still rudimentary in this version and will be polished later.
Thanks to kn@ for reminding me that i have been considering since BSDCan 2014 whether something like this might be useful. Given that possibilities of making automatic tagging better are running out and there are still several situations where automatic tagging cannot do the job, i think the time is now ripe.
Feedback and no objection from millert@; OK espie@ inoguchi@ kn@.
show more ...
|
#
ac01d98f |
| 10-Dec-2019 |
bentley <bentley@openbsd.org> |
In HTML, display straight quotes, not curly quotes, for Qq/Qo/Qc macros.
This is the intended behavior and already the case in terminal output.
Incorrect output noticed by Eldred Habert.
ok schwar
In HTML, display straight quotes, not curly quotes, for Qq/Qo/Qc macros.
This is the intended behavior and already the case in terminal output.
Incorrect output noticed by Eldred Habert.
ok schwarze@
show more ...
|
#
e2edd184 |
| 15-Sep-2019 |
schwarze <schwarze@openbsd.org> |
Fix line breaking in no-fill mode (.Bd -unfilled/<pre>), which apparently didn't work since the .Pp/<p> reorg. The new logic is more similar to what the terminal formatter does:
1. Before a node tha
Fix line breaking in no-fill mode (.Bd -unfilled/<pre>), which apparently didn't work since the .Pp/<p> reorg. The new logic is more similar to what the terminal formatter does:
1. Before a node that starts a new mdoc(7) input line, start a new HTML output line. 2. An empty input line or a .Pp causes an empty output line. 3. Nothing needs to be done at the end of a node.
Severe misformatting was reported in table(5) by Edgar Pettijohn <edgar at pettijohn dash web dot com> on misc@.
show more ...
|
#
faccc662 |
| 03-Sep-2019 |
schwarze <schwarze@openbsd.org> |
Format .Nd with more logically with <span> rather than <div>; after all, it is supposed to be a one-line description. For the case where .Nd generates flow content (which is very bad style but synta
Format .Nd with more logically with <span> rather than <div>; after all, it is supposed to be a one-line description. For the case where .Nd generates flow content (which is very bad style but syntactically valid), rely on the new feature of html_close_paragraph() to close out the <span> prematurely, effectively moving the flow content out of the .Nd for HTML presentation. For the final closing, also rely on the new html_close_paragraph() functionality, this time triggered by the subsequent block, which will typically be .Sh SYNOPSIS.
show more ...
|
#
c5914f85 |
| 01-Sep-2019 |
schwarze <schwarze@openbsd.org> |
delete the TAG_IDIV crutch, which is no longer used
|