w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.14k stars 256 forks source link

Add build support for linking to bibliographical references #4124

Closed kfranqueiro closed 1 week ago

kfranqueiro commented 1 month ago

Refs #2535

This adds support to the Eleventy build system for resolving bibliographical references within paragraphs in the format [[ref]], and converting them into links within single brackets instead.

This resolves against both specref.org and the local bibliography configured in biblio.js in this repo.

Note that there are some references that have no resolution in either of these sources, which is why I'm not marking this as fully resolving the related issue.

Details at https://github.com/w3c/wcag/issues/2535#issuecomment-2445246302

Here's a breakdown of what is successfully replaced: (search for these in single brackets on the page in question on the PR preview; some may require expanding Key Terms)

netlify[bot] commented 1 month ago

Deploy Preview for wcag2 ready!

Name Link
Latest commit 7882fb03d26f0436adcdfb759046baaff7235c94
Latest deploy log https://app.netlify.com/sites/wcag2/deploys/673cced500e9e80008600a21
Deploy Preview https://deploy-preview-4124--wcag2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

w3cbot commented 1 month ago

kfranqueiro marked as non substantive for IPR from ash-nazg.

patrickhlauke commented 1 month ago

There seem to also be some double-bracketed references here and there (e.g. https://deploy-preview-4124--wcag2.netlify.app/understanding/contrast-minimum#rationale-for-the-ratios-chosen)

EDIT: ah, never mind, i should read your actual description first before barging in ... still work in progress :)

iadawn commented 1 week ago

@kfranqueiro Code looks fine to me. There is one comment relating to informative references which I think would be worth putting in.

Next step would be listing those references that do not resolve to anything. Will need to take those to the TF to come up with the correct references then we can add them into the biblio.js

kfranqueiro commented 1 week ago

@kfranqueiro Code looks fine to me. There is one comment relating to informative references which I think would be worth putting in.

Added.

Next step would be listing those references that do not resolve to anything. Will need to take those to the TF to come up with the correct references then we can add them into the biblio.js

Fortunately, this code already lists the references that do not resolve:

Unresolved biblio refs: LAALS, HEARING-AID-INT, ISO-9241-3, ANSI-HFES-100-1988, ARDITI-FAYE, ARDITI-KNOBLAUCH-1994, ARDITI-KNOBLAUCH-1996, ARDITI, GITTINGS-FOZARD