-
Notifications
You must be signed in to change notification settings - Fork 52
Description
Issue stemming from the CF Workshop 25 Hackathon session '(Digital) accessibility of the CF Convention document' (see also #606). As chair of the session, I want to capture our agreed goals in formal Issues to track progress.
Title
Accessibility (& style): add dark mode toggle-able with existing light mode
Moderator
n/a or TBC - likely not needed as this is an infrastructure change, and not controversial?
Moderator Status Review [last updated: YYYY-MM-DD]
n/a or TBC
Requirement Summary
Define and make available, in a way where it can be toggled on/off as an alternative to the existing light mode theme, a 'dark mode' theme - one with light text on a dark background as opposed to vice versa - for any documents in HTML build form of relevance to CF (notably the main/canonical and conformance documents) and ideally also for the website, too - or at very least in terms of the website, for the listings/tables of the controlled vocabularies in HTML/webpage format, which also define the metadata standard itself as opposed to providing context/detail.
I have prepared a PR as a proof of concept which implements and showcases a configurable (by toggle button) dark mode for the HTML build of the canonical document (specifically, just the latest/v1.13 draft build and not previous documents). This could be merged as-is but note a comprehensive solution would also have the same, or similar, for the other documents, and a website solution would also be required.
Technical Proposal Summary
The CF Conventions documents (main, conformance, etc.) are built to HTML (i.e. webpage view in a browser) and to PDF, viewable in either format. Both formats are built by AsciiDoc (in the latter case, AsciiDoc PDF) which builds them in a set theme - in the PDF case only we customise this with a YAML form stylesheet, but for the HTML build we don't customise theming so that the theme the HTML documents are rendered to is the default for AsciiDoc. Notably this is a light mode - dark text on a light background.
We advocate for the addition of an alternative theme in the form of a 'dark mode' - light text on a dark background, with benefits outlined in the section below, notably improving digital accessibility of CF. Ideally, the dark mode option would be:
- available for all standard documents in HTML view, as well as all webpages on the website - note since the alternative build format to HTML is PDF which is, in the internet age, used much more with printing in mind, I don't think it is important to consider here for dark mode support (but that is open for discussion);
- configurable so that the viewer can switch easily between light and dark mode by means of a button or similar;
- by default, assigned to the dark or light mode preference expressed by the viewer in their browser preferences.
Note whilst further theme/style options might be nice to have, a dark mode alternative to light mode is the most pressing and common alternative to provide, so would be a good first step to support, even if in future others wish to extend with even more possibilities for themes/modes.
Benefits
Dark mode is preferred by many to light mode because it can be less strain on the eyes and facilitate working from a dark room and/or at night, or simply is favoured as a style preference - so many community members would benefit from being able to choose to view the CF documents and website in dark mode. Anyone viewing the document could (on paper), at least, appreciate that we have provided a choice of themes rather than one fixed one.
Status Quo
At present, both the documents in HTML and the website only have one styling theme available i.e. the theme is fixed, and it is in 'light' mode - that is, dark text on a light background. There is no native configurability there (though someone could technically tweak theming via a browser plugin, and one can for sure tweak things via changing CSS values from the developer console/tools, but both of these are contrived, custom solutions that require effort and knowledge, therefore not acceptable).
Associated pull request
Detailed Proposal
n/a - all covered above.