Skip to content
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

fix(a11y)!: use github-style header anchor generation #4609

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Mar 8, 2025

BREAKING CHANGES:

  • --vp-header-anchor-symbol is removed.
  • The default permalink function of markdown-it-anchor is changed to linkAfterHeader. This will need updates in your custom themes.
  • To customize header anchor symbol or revert back to old permalink behavior, you can customize markdown.anchor.permalink in your vitepress config to some other one from markdown-it-anchor.

This brings the original proposed behavior of #2039, #2040 which wasn't introduced to avoid breaking changes.

fixes #2980
closes #2982

TODO:

  • update tests

BREAKING CHANGES:
- `--vp-header-anchor-symbol` is removed
- The default permalink function of markdown-it-anchor is changed to `linkAfterHeader`. This will need updates in your custom themes.

This brings the original proposed behavior of #2039, #2040 which wasn't introduced to avoid breaking changes.

fixes #2980
closes #2982
@brc-dd brc-dd marked this pull request as draft March 8, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a11y: Headings are read verbosely by VoiceOver
1 participant