Bug 273885 - Accessibility: review use of italicised green monospace in manual pages
Summary: Accessibility: review use of italicised green monospace in manual pages
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Wolfram Schneider
URL:
Keywords: accessibility
Depends on:
Blocks: 273903
  Show dependency treegraph
 
Reported: 2023-09-17 09:23 UTC by Graham Perrin
Modified: 2024-01-20 19:13 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin 2023-09-17 09:23:44 UTC
Today, at first sight, <https://man.freebsd.org/cgi/man.cgi?query=auto-update-system&sektion=1&manpath=freebsd-ports> appeared wrong. 

First line (header of the manual content): the italicised green monospace words, immediately adjacent to upright non-green numbers in parentheses. 

Comparing with a recent capture from <https://web.archive.org/web/*/https://man.freebsd.org/cgi/*>, I assume that the change from upright black to italicised green, in headers and footers, is fairly recent. 

8th August 2023: <https://web.archive.org/web/20230808175410/http://man.freebsd.org/cgi/man.cgi?query=tcp_bbr&apropos=0&sektion=0&manpath=FreeBSD+14.0-CURRENT&arch=default&format=html> – upright black.

manpath=freebsd-current for the same page, captured today: <https://web.archive.org/web/20230917091918/https://man.freebsd.org/cgi/man.cgi?query=tcp_bbr&sektion=4&manpath=freebsd-current> – italicised green.

Generally
=========

Amongst the top five results for <https://www.startpage.com/do/dsearch?query=accessibility+monospace+italic&cat=web>: 

Font - Low Vision Accessibility Task Force
<https://www.w3.org/WAI/GL/low-vision-a11y-tf/wiki/Font>

Quote: 

> italic text is often difficult to read with low vision, 

I find <https://man.freebsd.org/cgi/man.cgi?query=hier&sektion=7&manpath=FreeBSD+15.0-CURRENT#HISTORY> particularly difficult, and so on.
Comment 2 Wolfram Schneider freebsd_committer freebsd_triage 2023-09-17 14:15:12 UTC
This is very likely a side effect of the groff 1.23.0 update.

I don't know why, I will check.
Comment 3 Wolfram Schneider freebsd_committer freebsd_triage 2023-09-17 15:00:50 UTC
I think problem is in the new variable doc-page-topic-font

/usr/local/share/groff/1.23.0/tmac/mdoc/doc-nroff
.ds doc-page-topic-font \f[I]

if you change that to

.ds doc-page-topic-font \f[]

the title will be displayed without italic fonts
Comment 4 Wolfram Schneider freebsd_committer freebsd_triage 2023-09-17 15:06:14 UTC
commit eeb7e34a074014631c5feab8121928a9b2ddc7a2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Nov 3 07:16:41 2022 -0500

    [mdoc]: Set man page topic names in italics.
    
    * tmac/mdoc/doc-ditroff (doc-page-topic-font):
    * tmac/mdoc/doc-nroff (doc-page-topic-font): Set man page topic names in
      italics.
Comment 5 Graham Perrin 2023-09-18 05:28:35 UTC
Thanks

(In reply to Graham Perrin from comment #0)

> Generally

>> ⋯ italic text is often difficult to read with low vision, ⋯

For the <https://man.freebsd.org/> view of things, would a style sheet (theme) menu be out of scope for the FreeBSD Project? 

I could raise the accessibility issue through the Bugs menu at <https://savannah.gnu.org/bugs/?group=groff>, however the need for upright text will probably be at odds with e.g <https://savannah.gnu.org/bugs/?63150>. 

----

If out of scope, then – as I did for comment widths in Bugzilla <https://userstyles.world/style/7895/> – I might share something to make texts upright at man.freebsd.org ⋯
Comment 6 G. Branden Robinson 2023-09-18 05:45:19 UTC
(In reply to Wolfram Schneider from comment #3)

Hi Wolfram!

(I will try harder to get your name correct--people misspell mine all the time, so I really shouldn't mess up others' names.)

"This is very likely a side effect of the groff 1.23.0 update.

I don't know why, I will check.

...

I think problem is in the new variable doc-page-topic-font

/usr/local/share/groff/1.23.0/tmac/mdoc/doc-nroff
.ds doc-page-topic-font \f[I]

if you change that to

.ds doc-page-topic-font \f[]

the title will be displayed without italic fonts

...

commit eeb7e34a074014631c5feab8121928a9b2ddc7a2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Nov 3 07:16:41 2022 -0500"

That is indeed the commit that changes the page topic to use the same face as the _mdoc_ `Xr` macro, which (as of _groff_ 1.23.0) also uses italics by defaults.

However, as you've found, this setting is also customizable, and there's nothing wrong with changing it.

I would not, however, make the exact change you proposed.

.ds doc-page-topic-font \f[]

This doesn't make a "null font change": it changes the font to the _previously selected_ font.  Sometimes this will have no adverse consequences, but I wouldn't bet on it never doing so, and it's the sort of thing that can be hard to track down later.

If you want the page topic to render in roman, I would say so explicitly.

.ds doc-page-topic-font \f[R]

In _groff_ 1.24.0 I hope to get the `MF` string from _groff man_ ported over to our _mdoc_ implementation to improve the package-neutral configurability of man page appearance.  (The reasons this wasn't already done have to do with PDF support for hyperlinks, whether internal or of the "man:ls(1)" kind; it's easier for me to develop features for _man_(7), get the bugs shaken out, then port them over to _mdoc_.)

If you want to eliminate the appearance of italic text in _mdoc_ documents as a low-vision accommodation measure (or for any other reason), you might also want to look at some other string definitions.  In _groff_ 1.22.4 (and "nroff mode"), the `Ad`, `Ar`, `Em`, `Fa`, `Ft`, `Pa`, `Sx`, and `Va` also used italics, as did the fixed string `Na` (which writes "NaN").  This list is mostly the same in _groff_ 1.23.0, with the removal of `Sx` and addition of `Xr`.

Regarding text appearing in green, that is not anything _groff_ does by default; _groff_ itself does not colorize man pages.  (It's overwhelmingly popular among Arch Linux users.)  Based on experience with other man-to-HTML converters, I surmise that what's happening is that a tool is telling _groff_ to format a man page for a terminal and then interpreting the output to infer typeface changes.  A CSS style may then be getting applied to the inferred faces.

Regarding the accessibility issues of italic text, I think it's important to keep the domain of application in mind.  As pointed out in the top link matching your "startpage" query,

https://ux.stackexchange.com/questions/62742/are-italics-on-the-web-bad-for-accessibility

...it seems that some people are interpreting a blanket prohibition against italics for Web content by (arguably) overreading a W3C recommendation.  Whether the problems that degrade the readability of italics apply to the FreeBSD web site is something that the FreeBSD project should decide for itself.

I will add that in _groff_ 1.23.0 italics are not used by default when rendering to terminals.  It can be enabled, however.  _grotty_, _groff_'s output driver for terminals, has long supported the production of ISO 6429/ECMA-48 SGR escape sequences for italics, but the switch to enable these has not been easy to access.  It is now.

https://git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.23.0#n86

Still, as I said, italics in terminal output are _off_ by default.  This might change in _groff_ 1.24.0, as Lennart Jablonka has proposed patches to make _grotty_ use _terminfo_ to determine the terminal's capabilities instead of firing blindly as it has done to date.

https://lists.gnu.org/archive/html/groff/2023-09/msg00027.html

Traditionally, "nroff devices" use underscores in place of italics, because the typewriter-based paper terminals that _roff_ and _nroff_ targeted in the early 1970s did not support oblique typefaces.  Apparently (per the above Stack Exchange thread), at one point the British Dyslexia Association discouraged thae underscoring practice as well...but the link is now dead.  Whether this suggests that the corresponding guidance has been withdrawn, I cannot say.

Finally, I would emphasize that _groff_, like the _troff_ from Bell Labs that inspired it, is a typesetting system.  At the aforementioned StackExchange thread, much of the quoted discussion expressing concern with the accessibility of italic text to those with low vision centered on issues of poor font quality or low-resolution glyph rendering.  _groff_ is indeed designed to format text even in such limited environments, but it also produces PDF, PostScript, PCL 5, and TeX DVI, where glyph detail can be of professional quality.  I think that if italic text were _inherently_ frustrating to low-vision accessibility, we'd have learned this fact hundreds of years ago, nearer to the time when italic, slanted, and oblique typefaces were first designed and set in lead, instead of stumbling on the fact suddenly in the wake of Tim Berners-Lee's most famous achievement.

Let me know how I can be of assistance.
Comment 7 Graham Perrin 2023-09-18 06:20:24 UTC
> ⋯ I might share something to make texts upright ⋯

Maybe not. If I understand correctly, things such as 

font-style: normal;

– can not be effective against <i>italics</i>, as seen even when I use (for example) the View menu of Firefox to prefer no style for the page style :-(
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-10-02 08:05:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d72c96279d8e8c28ad6d3f79287d05e95dc7bdfc

commit d72c96279d8e8c28ad6d3f79287d05e95dc7bdfc
Author:     Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2023-10-02 08:02:20 +0000
Commit:     Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2023-10-02 08:04:45 +0000

    textproc/groff: don't show topic in italic, be compatible with groff 1.22.4 and mandoc

    PR: 273885

 textproc/groff/Makefile         | 2 +-
 textproc/groff/files/mdoc.local | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
Comment 9 Mark Linimon freebsd_committer freebsd_triage 2024-01-20 19:13:43 UTC
^Triage: this apparently has been fixed.