-
Notifications
You must be signed in to change notification settings - Fork 395
feat(equations): add alt-text and div syntax for equations #13872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: deps/pandoc-2025-08
Are you sure you want to change the base?
Conversation
…uarto-dev#13847) * fix: change meta selector from "name" to "property" * chore: update changelog for version 1.9 * chore: update changelog for og:site_name meta tags clarification Clarified the description of the change regarding the `og:site_name` meta tags to ensure proper metadata markdown processing. * chore: Update changelog for version 1.9 * test: check if og:site_name in generated HTML correctly uses variable in site title * test - use ensureHtmlElements instead of regex to check for HTML elements in tests --------- Co-authored-by: Christophe Dervieux <christophe.dervieux@gmail.com>
✅ 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. |
|
Because to trigger the use of |
LaTeX with tagging=on + unicode-math auto-generates MathML for accessible math. Typst requires explicit alt text and correctly errors at compile time when it's missing. Also adds test for equation alt text syntax from PR #13872 (both attribute and div syntax). Currently expects Typst to fail since the feature isn't merged yet - update to noErrors once #13872 lands. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Does this mean it requires #13249? You could make this PR against that branch, that way we'll benefit the updated version. and we'll be sure to merge after. |
|
Done |
|
The PR is a bit noisy because it contains commits from main not in the new base branch. |
cderv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot !
I reviewed with mostly some questions because this PR touches functions in Lua that are used for all crossref.
So it is indeed adding support for Typst, but we should verify the side effect for other cases and formats where the function are used - possibly by adding more tests than equations as all crossref will be impacted.
Also, if we do add support for alt in equation for typst, do we need to try add support for other format ? usually when we add a feature we try to cover all formats, so I am wondering.
At least we'll need a companion Documentation PR that explains the limitations.
- Either we document
alt=in equation syntax only in Typst page: https://quarto.org/docs/output-formats/typst.html - Either we document new alt support in generic markdown: https://quarto.org/docs/authoring/cross-references.html#equations but in that case it will need a callout for "Typst only" feature.
So maybe former is better.
Again, thanks for the feature!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comes from a commit we already merged on main.
We'll sort out while merging to keep PR scoped and clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this test folder. We'll remove from this PR before merging to get clean PR as it does not belong to this one.
Briefly, I don't believe LaTeX/OpenXML care about this and if there is even a way. I did not take a deep look at those, so I might have missed something. For the context, I was playing around with my template when I hit those issues, instead of making myself a Lua workaround, I started this PR as it's mandatory for UA-1. Thanks for the review and comments about other functions/tools defined elsewhere in the codebase. |
Ok it makes sense, so maybe this something to document only at Typst doc level as an exception, and be sure that we don't impact other format with this. For LaTeX, I am aware of the following package for accessibility (https://ctan.org/pkg/axessibility), but I have never tried it. Just overall with the new accessibility requirement, maybe there is something with new standard that we don't know yet about. For HTML, yes this is the library, but we do know which one is used |
I meant, I'm not aware of them using alternative text, for example MathJax https://docs.mathjax.org/en/latest/basic/accessibility.html |
|
@cderv I'll refocus this PR and open a separate feature request for the div syntax. |
LaTeX with tagging=on + unicode-math auto-generates MathML for accessible math. Typst requires explicit alt text and correctly errors at compile time when it's missing. Also adds test for equation alt text syntax from PR #13872 (both attribute and div syntax). Currently expects Typst to fail since the feature isn't merged yet - update to noErrors once #13872 lands. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Important
For the Typst tests to pass on CI/CD, Typst >= 0.14 is required.
Implement alt-text functionality for math equations to comply with the PDF UA-1 accessibility standard.
This enhancement allows users to specify alternative text for equations using the
altattribute in Typst 0.14 and above.This PR also adds support for the div-syntax.
Additionally, refactor the code to reduce duplication (brought by div processing).
Fixes #13870