fix(accessibility): announce ORCID profile link in ipynb title-block#14632
Open
cderv wants to merge 4 commits into
Open
fix(accessibility): announce ORCID profile link in ipynb title-block#14632cderv wants to merge 4 commits into
cderv wants to merge 4 commits into
Conversation
The ipynb title-block emitted the ORCID icon as a link wrapping an image with empty alt text, so the link had no accessible name and screen readers fell back to announcing the base64 image data. Same gap PR #14602 fixed for the HTML/Reveal.js author-metadata templates, which was explicitly scoped out of that PR for ipynb. Put the author's name in the markdown image alt text. That is the only alt that survives the ipynb writer: ipynb.lua deliberately strips image attributes (so pandoc emits a markdown image, not a raw <img>, which would break notebook attachment handling in environments like VS Code), which rules out fig-alt / aria-label approaches. The image caption (the markdown alt) is unaffected by that stripping, so a link wrapping the image takes the alt as its accessible name across all markdown renderers. The affiliation-level ORCID site is updated for consistency, though affiliations carry no orcid field (kAffiliationFields in modules/authors.lua; orgs use ROR/ISNI/Ringgold), so that branch does not render in practice.
…dding one verify.ts already covers many output shapes, including parsed-content verifiers (notebook JSON, DOM) rather than only raw-text regex. Adding a near-duplicate verifier was easy to do by reflex; this points future work at the existing helpers first so they get reused or extended instead.
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…14602) Extends the ORCID accessibility test suite to cover HTML and Reveal.js (#14602) alongside the existing ipynb tests (#14632). One shared fixture (title-block-orcid.qmd) renders to all three formats, replacing the format-specific title-block-orcid-ipynb.qmd. The affiliation fixture stays separate as it covers a distinct ipynb template path.
Merge into existing #14602 entry since both PRs fix the same gap (ORCID link has no accessible name for screen readers) across different output formats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#14602 fixed ORCID icon links in HTML and Reveal.js author-metadata templates (image had empty alt, link had no accessible name, screen readers fell back to announcing base64 data). The ipynb title-block had the same gap, explicitly scoped out of that PR.
Root Cause
ipynb.luadeliberately strips all image attributes (imgEl.attr = pandoc.Attr(),render_ipynb_fixups) to prevent pandoc from emitting raw<img>HTML, which breaks notebook attachment handling in environments like VS Code. This means thearia-label/alt=""approach from #14602 cannot be used in the ipynb template — any attribute set on the image is dropped.Fix
Put the author's name in the markdown image alt text:
[](url). The image caption (markdown alt) is not an attribute and survives the stripping. A link wrapping only an image takes the alt as its accessible name across all markdown renderers.fig-altwas also ruled out: it is processed only for HTML/LaTeX/Typst/AsciiDoc output paths, has no ipynb code path, and would be stripped as an image attribute anyway.Related to #14602 (add test for it too)