ReSpec Plug-ins

Hi Everyone,

I'm the editor of the Web Sustainability Guidelines<https://w3c.github.io/sustainableweb-wsg/> for Sustainable Web IG<https://www.w3.org/groups/ig/sustainableweb/> and as part of my editorial duties I've been playing with ReSpec's tooling to try and improve the readability of our specification for readers by creating some custom features (that I thought I'd share as others may find it useful).


  *
The first plug-in I created is multiPage<https://w3c.github.io/sustainableweb-ig/multipage.html>. It uses sectioning elements within a specification as pagination breakpoints and uses anchor fragments as navigation points of origin (thereby it allows people whether offline or online to reference pages, sections, or part of a spec with ease). It also doesn't affect "jump to reference" capability as the script I've created shows the "page" related to the fragment you wish to see, if you view the WSG specification you can get an idea as to how it works in practice. Also note that a full-document option is always available if you want to see everything on the screen.
  *
The Second plug-in I've developed is Tag and Filter<https://w3c.github.io/sustainableweb-ig/tagFilter.html>, and it's a little more complex than native pagination. It allows you to "filter" a specification's Success Criteria based upon the options a user selects. In the WSG we customized it in collaboration with multiPage to be visible only within full-document mode<https://w3c.github.io/sustainableweb-wsg/#full-document>. When you open the "filter the available Success Criteria" details box it will "clear the board" awaiting your choices. I should also note that you can mix and match content between categories, so the sky is the limit as to displaying material between areas of interest (and management of content is straight forward as it functions upon html data attributes). It's very much a polyblend based on WCAG 2.2 QuickRef<https://www.w3.org/WAI/WCAG22/quickref/> and Privacy Principles basic filter<https://www.w3.org/TR/privacy-principles/> but grafted within a full specification.

I hope people find this interesting, and if anyone finds it useful feel free to adapt it to your own work (it's actively under development alongside our spec).

Alexander Dawson

Received on Tuesday, 17 June 2025 13:26:53 UTC