fix(a11y): convert all Mermaid YAML header blocks to inline accTitle/accDescr syntax#995
Conversation
|
Warning Review limit reached
More reviews will be available in 50 minutes. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR migrates all Mermaid diagrams repository-wide from a YAML ChangesMermaid Accessibility Format Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Metadata governance
|
🎨 Mermaid Diagram Validation✅ All Mermaid diagram checks passed.
|
🔍 Reviewer Summary for PR #995CI Status: ❌ Recommendations
|
…syntax GitHub's Mermaid renderer does not support the --- YAML front-matter block syntax (Mermaid v10.3+ feature). Diagrams with --- headers before the diagram type fail to render and show a parse error. Convert all affected diagrams to the supported inline syntax where accTitle and accDescr appear inside the diagram body, directly after the type declaration. Files fixed: - .github/ISSUE_TEMPLATE/README.md - .vscode/README.md - docs/AGENT_CREATION.md - docs/CANONICAL_CONFIGS_GUIDE.md - instructions/mermaid.instructions.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
Convert remaining --- YAML header syntax to inline accTitle/accDescr in two audit report files that had broken Mermaid diagram rendering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
GitHub's renderer does not support YAML front-matter (--- blocks) in Mermaid diagrams. Convert all diagrams to use inline accTitle and accDescr statements after the diagram type declaration. Files fixed (YAML header removal): - .github/README.md — 4 diagrams (had inline attrs already; YAML headers removed) Documentation and tooling updates: - instructions/mermaid.instructions.md — rules updated to document inline syntax as required; explicitly forbids YAML --- front-matter - .github/prompts/update-mermaid-diagrams.prompt.md — rewritten to instruct inline format; includes clear WRONG vs CORRECT examples - scripts/validation/validate-mermaid-accessibility.js — now rejects diagrams that start with YAML --- front-matter and provides actionable error messages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
Regenerated mermaid-accessibility-report.md and spreadsheet/validation reports to reflect the inline accTitle/accDescr syntax fixes across the repository. All diagrams now pass compliance validation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
There was a problem hiding this comment.
Code Review
This pull request standardizes Mermaid diagram accessibility by migrating from YAML front-matter headers to inline accTitle and accDescr attributes across all documentation and configuration files. The validation script has been updated to enforce this requirement and reject the unsupported YAML syntax. Feedback includes a recommendation to exclude the .claude/ directory from the validation scan to avoid processing temporary worktrees and a suggestion to improve the robustness of the block tracking logic using regex.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…ouched files All files modified by the Mermaid YAML-header conversion commits require version and last_updated frontmatter updates per the validate:frontmatter:changed CI check. Also rebased onto develop to incorporate PR #994 changes. Gemini review fixes (validate-mermaid-accessibility.js): - Add **/.claude/** to globSync ignore list to skip Claude Code worktrees - Use regex /^accDescr\s*\{/ instead of startsWith('accDescr {') for robustness Files bumped: - .github/ISSUE_TEMPLATE/README.md: v1.7 → v1.8 (2026-06-19) - .github/README.md: 3.6 → 3.7 (2026-06-19) - .github/prompts/update-mermaid-diagrams.prompt.md: (2026-06-19) - .github/reports/audits/2026-06-03-…-673.md: v1.0.0 → v1.0.1 (2026-06-19) - .github/reports/mermaid-accessibility-report.md: 1.0.0 → 1.0.1 (2026-06-19) - .vscode/README.md: v1.3 → v1.4 (2026-06-19) - docs/AGENT_CREATION.md: v1.5 → v1.6 (2026-06-19) - docs/CANONICAL_CONFIGS_GUIDE.md: v1.0.2 → v1.0.3 (2026-06-19) - instructions/mermaid.instructions.md: v2.2 → v2.3 (2026-06-19) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
549c061 to
443a6c2
Compare
Documents the conversion of YAML front-matter blocks to inline accTitle/ accDescr syntax in all affected markdown files (PR #995, closes #991). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 443a6c2ce8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .claude/worktrees/agent-ad0b044aa1f4b21f2/tests/README.md,2,sequenceDiagram,No,No,"Missing accTitle attribute; Missing accDescr attribute",⚠️ Non-Compliant | ||
| .claude/worktrees/agent-ad0b044aa1f4b21f2/tests/README.md,3,flowchart,No,No,"Missing accTitle attribute; Missing accDescr attribute",⚠️ Non-Compliant | ||
| File,Diagram Number,Diagram Type,Has accTitle,Has accDescr,Missing Attributes,Compliance Status | ||
| .claude/worktrees/agent-af9d252cbba862929/.github/ISSUE_TEMPLATE/README.md,1,flowchart,No,No,"Missing accTitle — add it inline after the diagram type (e.g. ` accTitle: My title`); Missing accDescr — add it inline after the diagram type (e.g. ` accDescr: My description`)",⚠️ Non-Compliant |
There was a problem hiding this comment.
Regenerate the accessibility artefacts from the repo
The regenerated spreadsheet starts with .claude/worktrees/... entries, which are local Claude worktree snapshots rather than files in this commit, so the committed artefacts now report failures for paths consumers cannot fix. This also contradicts the new **/.claude/** ignore and the PR verification claim that Mermaid accessibility passes; please rerun the report/spreadsheet generation after applying that ignore so the published audit reflects only tracked repository files.
Useful? React with 👍 / 👎.
| const firstMeaningfulLine = lines.find( | ||
| (l) => l.trim() !== "" && !l.trim().startsWith("%%"), | ||
| ); | ||
| if (firstMeaningfulLine && firstMeaningfulLine.trim() === "---") { |
There was a problem hiding this comment.
Reject pre-type accessibility lines
With the new rule that the first meaningful Mermaid line must be the diagram type, this branch only rejects ---; a block beginning with accTitle: or accDescr: still falls through to the presence-only regex checks and is reported accessible. Existing blocks such as CONTRIBUTING.md already use that pre-type form, so CI can stay green while diagrams violate the new standard; reject any non-comment first line that is not a supported diagram type before checking the attributes.
Useful? React with 👍 / 👎.
…or coercion YAML parses bare hex strings like 8957E5 as scientific notation (895700000) and 007580 as decimal integer (7580), causing label-sync.js to crash with "labelObj.color.replace is not a function". Quote all affected color values in labels.yml and add String() coercion in label-sync.js for defence-in-depth. Also regenerates mermaid accessibility reports now that .claude/** worktree paths are excluded from the glob scan. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuT8NQeGYY9UQHLsX3MMHc
|
@Mergifyio queue |
Merge Queue Status
Waiting for
All conditions
|
Fix Pull Request
Linked issues
Closes #991
Summary
GitHub's embedded Mermaid renderer does not support YAML front-matter (
---blocks before the diagram type line). Diagrams using that format fail to render and show a parse error. The correct format placesaccTitleandaccDescras inline statements inside the diagram body, directly after the diagram type declaration.This PR converts all affected Mermaid diagrams across the repository to the correct inline syntax and updates validation tooling and documentation to enforce it going forward.
Changes
Diagram fixes (YAML header → inline syntax):
.github/ISSUE_TEMPLATE/README.md— 1 diagram.github/README.md— 4 diagramsdocs/AGENT_CREATION.md— 8 diagramsdocs/CANONICAL_CONFIGS_GUIDE.md— 2 diagrams.vscode/README.md— 1 diagraminstructions/mermaid.instructions.md— code examples updated.github/reports/audits/2026-06-03-file-organisation-migration-plan-673.md.github/reports/audits/readme-audit-2026-05-31.mdTooling and documentation:
scripts/validation/validate-mermaid-accessibility.js— now rejects diagrams where the first meaningful line is---(YAML front-matter), with a clear error directing users to use inline syntaxinstructions/mermaid.instructions.md— updated rules to explicitly forbid YAML---front-matter and document the correct inline format.github/prompts/update-mermaid-diagrams.prompt.md— rewritten to show correct inline format with explicit WRONG vs CORRECT examples.github/reports/mermaid-accessibility-report.md— regeneratedImpact / Compatibility
validate:mermaid-accessibilitywill now fail on any future YAML front-matter diagramsVerification
validate:mermaid-accessibilitypasses (all diagrams use inline syntax)Risk & Rollback
Changelog
Fixed
---YAML front-matter blocks to inlineaccTitle/accDescrsyntax, which is the only format supported by GitHub's Mermaid renderer. Closes fix(a11y): ISSUE_TEMPLATE README.md Mermaid diagram missing YAML header blockaccTitle/accDescr#991.validate-mermaid-accessibility.jsto reject YAML front-matter and provide actionable error messages.instructions/mermaid.instructions.mdand Mermaid prompt to document and enforce the correct inline format.Checklist (Global DoD / PR)
Generated by Claude Code