By·

Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly

Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.

Rendered Mermaid diagram example for Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly
Rendered Mermaid diagram example from this tutorial.

# Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly

Mermaid.js is the de facto standard for text-to-diagram rendering in developer docs. But out of the box, rendered SVG diagrams are invisible to screen readers. Every , , and element sits in the DOM without any semantic meaning.

If your docs live on a public site, an internal wiki, or a product help center, inaccessible diagrams mean you are shutting out users who rely on assistive technology — and potentially violating WCAG 2.1 requirements.

This guide covers every technique available in Mermaid 10+ to make diagrams accessible: ARIA attributes, descriptive text, accessible color palettes, and integration patterns for common platforms.

The Problem: Mermaid SVG Is Not Accessible by Default

A Mermaid flowchart rendered from this source:

graph TD
    A[Login] --> B{Dashboard}
    B -->|Admin| C[Admin Panel]
    B -->|User| D[User Profile]
Try in Editor →

Produces SVG output that a screen reader encounters as an opaque blob of vector paths. There are no landmark roles, no heading structure, no text alternatives. The user hears nothing useful.

Solution 1: The `accessibility` Config (Mermaid 10.3+)

Mermaid 10.3 introduced a dedicated accessibility configuration object. This is the most important feature for diagram accessibility:

mermaid.initialize({
  accessibility: {
    title: "User Authentication Flow",
    description: "Flowchart showing login redirecting to Admin Panel or User Profile based on role",
    svgRole: "img"
  }
});

What Each Setting Does

OptionValuesEffect
`title`stringSets the `` child element inside the SVG — read by screen readers as the accessible name</td></tr><tr class="bg-gray-50"><td class="px-4 py-2 text-gray-600 border-b">`description`</td><td class="px-4 py-2 text-gray-600 border-b">string</td><td class="px-4 py-2 text-gray-600 border-b">Sets the `<desc>` child element — read as the accessible description</td></tr><tr class=""><td class="px-4 py-2 text-gray-600 border-b">`svgRole`</td><td class="px-4 py-2 text-gray-600 border-b">`"img"` or `"graphics-document"`</td><td class="px-4 py-2 text-gray-600 border-b">`"img"` treats the diagram as a single image (default); `"graphics-document"` exposes individual nodes</td></tr></tbody></table></div><p class="text-gray-700 leading-relaxed my-3"><code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole: "img"</code> is the recommended default. It tells the screen reader to announce the title and description and treat the entire SVG as one element. Users can skip past it or drill in.</p><p class="text-gray-700 leading-relaxed my-3"><code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole: "graphics-document"</code> makes each node individually navigable — useful for large architectural diagrams where exploring node-by-node is the goal.</p><h3 class="text-xl font-semibold text-gray-800 mt-8 mb-3">Complete Example: Accessible Flowchart</h3><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code><pre class="mermaid"> graph TD A[Start] --> B{Is User Logged In?} B -->|Yes| C[Load Dashboard] B -->|No| D[Redirect to Login] </pre> <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> <script> mermaid.initialize({ startOnLoad: true, accessibility: { title: "Login Decision Flow", description: "Decision tree: if user is logged in, load dashboard; otherwise redirect to login page", svgRole: "img" } }); </script></code></pre></div><p class="text-gray-700 leading-relaxed my-3">Screen reader output: *"Login Decision Flow — image. Decision tree: if user is logged in, load dashboard; otherwise redirect to login page."*</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Solution 2: Per-Diagram ARIA with `%%{init}``</h2><p class="text-gray-700 leading-relaxed my-3">When you have multiple diagrams on one page, set accessibility metadata per-diagram using the <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">%%{init}</code>` directive:</p><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code>%%{init: { "accessibility": { "title": "Microservices Data Flow", "description": "Data moving from API Gateway through Auth Service to Database", "svgRole": "img" } } }%% graph LR Client --> Gateway Gateway --> Auth Auth --> DB</code></pre><a href="/?code=JSV7aW5pdDogeyAiYWNjZXNzaWJpbGl0eSI6IHsgInRpdGxlIjogIk1pY3Jvc2VydmljZXMgRGF0YSBGbG93IiwgImRlc2NyaXB0aW9uIjogIkRhdGEgbW92aW5nIGZyb20gQVBJIEdhdGV3YXkgdGhyb3VnaCBBdXRoIFNlcnZpY2UgdG8gRGF0YWJhc2UiLCAic3ZnUm9sZSI6ICJpbWciIH0gfSB9JSUKZ3JhcGggTFIKICAgIENsaWVudCAtLT4gR2F0ZXdheQogICAgR2F0ZXdheSAtLT4gQXV0aAogICAgQXV0aCAtLT4gREI=" class="inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 font-medium mb-4 -mt-2">Try in Editor →</a></div><p class="text-gray-700 leading-relaxed my-3">This overrides the global <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accessibility</code> config for that specific diagram only.</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Solution 3: Node-Level Descriptions with `accDescr`</h2><p class="text-gray-700 leading-relaxed my-3">Mermaid 10.4+ supports per-node accessible descriptions using a special syntax:</p><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code>graph TD A["Login Page<br/>accDescr: Username and password form with submit button"] B["Dashboard<br/>accDescr: Main overview showing charts, recent activity, and quick actions"]</code></pre><a href="/?code=Z3JhcGggVEQKICAgIEFbIkxvZ2luIFBhZ2U8YnIvPmFjY0Rlc2NyOiBVc2VybmFtZSBhbmQgcGFzc3dvcmQgZm9ybSB3aXRoIHN1Ym1pdCBidXR0b24iXQogICAgQlsiRGFzaGJvYXJkPGJyLz5hY2NEZXNjcjogTWFpbiBvdmVydmlldyBzaG93aW5nIGNoYXJ0cywgcmVjZW50IGFjdGl2aXR5LCBhbmQgcXVpY2sgYWN0aW9ucyJd" class="inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 font-medium mb-4 -mt-2">Try in Editor →</a></div><p class="text-gray-700 leading-relaxed my-3">When <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole</code> is set to <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">"graphics-document"</code>, each node's <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accDescr</code> is exposed as the accessible description for that individual SVG group element.</p><p class="text-gray-700 leading-relaxed my-3"><strong>Note:</strong> <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accDescr</code> is still experimental in Mermaid 10.x. Test with your target screen reader (NVDA, JAWS, VoiceOver) before relying on it in production.</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Solution 4: Wrapping Diagrams in Semantic HTML</h2><p class="text-gray-700 leading-relaxed my-3">The simplest and most reliable approach for any Mermaid version — wrap the diagram in a <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm"><figure></code> with explicit <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">aria-</code> attributes:</p><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code><figure role="img" aria-labelledby="diagram-caption" aria-describedby="diagram-desc"> <figcaption id="diagram-caption">User Authentication Flow</figcaption> <p id="diagram-desc" class="sr-only"> Flowchart showing login page redirecting authenticated users to the dashboard and unauthenticated users back to the login page with an error message. </p> <pre class="mermaid"> graph TD A[Login] --> B{Valid?} B -->|Yes| C[Dashboard] B -->|No| D[Error] </pre> </figure></code></pre></div><p class="text-gray-700 leading-relaxed my-3">The <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">.sr-only</code> class (screen-reader-only) hides the description visually while keeping it in the accessibility tree:</p><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code>.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }</code></pre></div><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Accessible Color Palettes</h2><p class="text-gray-700 leading-relaxed my-3">Color-blind users (roughly 8% of males) may not distinguish red/green node colors. Use Mermaid themes or custom <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">themeVariables</code> with accessible palettes:</p><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code>mermaid.initialize({ theme: 'base', themeVariables: { // Accessible palette: high contrast, colorblind-safe primaryColor: '#4A90D9', // Blue instead of red primaryTextColor: '#FFFFFF', secondaryColor: '#F5A623', // Orange instead of green tertiaryColor: '#7B68EE', // Medium slate blue lineColor: '#333333', textColor: '#1A1A1A' } });</code></pre></div><p class="text-gray-700 leading-relaxed my-3">Tools to validate your palette:</p><p class="text-gray-700 leading-relaxed my-3">- <a href="https://webaim.org/resources/contrastchecker/" class="text-blue-600 hover:underline">WebAIM Contrast Checker</a> — ensure 4.5:1 ratio for normal text</p><p class="text-gray-700 leading-relaxed my-3">- <a href="https://www.color-blindness.com/coblis-color-blindness-simulator/" class="text-blue-600 hover:underline">Coblis Color Blindness Simulator</a> — preview how your diagram looks with different types of color blindness</p><p class="text-gray-700 leading-relaxed my-3">- Mermaid's built-in <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">neutral</code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">forest</code> themes already use high-contrast accessible defaults</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Platform-Specific Tips</h2><h3 class="text-xl font-semibold text-gray-800 mt-8 mb-3">GitHub Markdown</h3><p class="text-gray-700 leading-relaxed my-3">GitHub's Mermaid renderer automatically applies <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole: "img"</code> with the diagram code as the accessible name. You cannot customize title/description in GitHub markdown — wrap your code block in an HTML <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm"><figure></code> with <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">aria-</code> attributes instead.</p><h3 class="text-xl font-semibold text-gray-800 mt-8 mb-3">Docusaurus</h3><div><pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4"><code>// docusaurus.config.js themeConfig: { mermaid: { options: { accessibility: { title: "", // set per-diagram via %%{init} description: "", svgRole: "img" } } } }</code></pre></div><h3 class="text-xl font-semibold text-gray-800 mt-8 mb-3">MermaidEditor.lol</h3><p class="text-gray-700 leading-relaxed my-3"><a href="https://mermaideditor.lol" class="text-blue-600 hover:underline">MermaidEditor</a> renders diagrams client-side. Copy the SVG output and add <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm"><title></code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm"><desc></code> elements manually before embedding in your page — or use the PNG export and add <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">alt</code> text on the <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm"><img></code> tag.</p><h3 class="text-xl font-semibold text-gray-800 mt-8 mb-3">Notion / Confluence / Obsidian</h3><p class="text-gray-700 leading-relaxed my-3">These platforms embed Mermaid as static images. The only accessible path is to add a caption or alt text in the platform's own image block settings.</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Testing Your Diagrams for Accessibility</h2><ol class="list-decimal pl-6 my-3 space-y-1 text-gray-700"><li><strong>axe DevTools</strong> (browser extension): Run an automated audit. It flags SVGs missing accessible names.</li><li><strong>Screen reader manual test</strong>: Open your page in Chrome with <a href="https://chromewebstore.google.com/detail/screen-reader/kgejglhpjiefppelpmljglcjbhoiplfn" class="text-blue-600 hover:underline">ChromeVox</a> or use VoiceOver (macOS) / NVDA (Windows). Navigate to the diagram and listen.</li><li><strong>Lighthouse</strong>: The accessibility audit in Chrome DevTools checks for image alt text — it will flag bare SVGs without <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">role="img"</code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">aria-label</code>.</li></ol><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">Quick Checklist</h2><p class="text-gray-700 leading-relaxed my-3">- [ ] Every diagram has a <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">title</code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">description</code> set via <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accessibility</code> config or <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">%%{init}</code>`</p><p class="text-gray-700 leading-relaxed my-3">- [ ] <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole</code> is explicitly set to <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">"img"</code> or <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">"graphics-document"</code></p><p class="text-gray-700 leading-relaxed my-3">- [ ] Color palette passes WCAG AA contrast (4.5:1 minimum)</p><p class="text-gray-700 leading-relaxed my-3">- [ ] Red/green are never the sole differentiators between node meanings</p><p class="text-gray-700 leading-relaxed my-3">- [ ] Large diagrams have a text summary adjacent in the page</p><p class="text-gray-700 leading-relaxed my-3">- [ ] Tested with at least one actual screen reader</p><h2 class="text-2xl font-bold text-gray-800 mt-10 mb-4">FAQ</h2><p class="text-gray-700 leading-relaxed my-3"><strong>Does Mermaid support WCAG 2.1 AA compliance?</strong></p><p class="text-gray-700 leading-relaxed my-3">Mermaid itself does not guarantee compliance — it is a rendering library. But with the <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accessibility</code> config, proper color choices, and semantic HTML wrappers, you can build WCAG AA-compliant pages that include Mermaid diagrams.</p><p class="text-gray-700 leading-relaxed my-3"><strong>Can screen readers read text inside Mermaid nodes?</strong></p><p class="text-gray-700 leading-relaxed my-3">Only if <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole</code> is set to <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">"graphics-document"</code> AND you have added <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accDescr</code> to each node (Mermaid 10.4+). For broader compatibility, use <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">svgRole: "img"</code> with a comprehensive title and description — this is the approach most platforms use.</p><p class="text-gray-700 leading-relaxed my-3"><strong>What about keyboard navigation within diagrams?</strong></p><p class="text-gray-700 leading-relaxed my-3">Mermaid does not currently support keyboard-navigable diagrams out of the box. For interactive exploration of complex diagrams, consider exporting the SVG and adding your own tab-indexable elements, or providing a text-based table equivalent of the diagram structure.</p><p class="text-gray-700 leading-relaxed my-3"><strong>Are Mermaid themes accessible?</strong></p><p class="text-gray-700 leading-relaxed my-3">The <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">neutral</code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">forest</code> themes use high-contrast color pairs. The <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">default</code> and <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">dark</code> themes may fail contrast checks. Always verify with WebAIM or axe DevTools.</p><p class="text-gray-700 leading-relaxed my-3"><strong>Is there a Mermaid plugin that handles accessibility automatically?</strong></p><p class="text-gray-700 leading-relaxed my-3">Not yet. The <code class="bg-gray-100 px-1.5 py-0.5 rounded text-sm">accessibility</code> config in Mermaid 10.3+ is the official solution. Community plugins for popular SSGs (Docusaurus, MkDocs) are beginning to add auto-generated descriptions from diagram source code, but these are still experimental.</p></div><aside class="mt-12 p-6 bg-purple-50 rounded-xl border border-purple-100"><h3 class="text-sm font-semibold text-purple-700 uppercase tracking-wide mb-4">Continue Learning</h3><ul class="space-y-2"><li><a class="text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium" href="/">Try the free Mermaid Live Editor →</a></li><li><a class="text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium" href="/cheat-sheet">Mermaid Syntax Cheat Sheet</a></li><li><a class="text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium" href="/templates">Mermaid Diagram Templates</a></li></ul></aside><div class="mt-10 text-center"><a class="inline-block bg-gradient-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:opacity-90 transition-opacity" href="/">Try it now in our free Mermaid Live Editor →</a></div><div class="mt-8 mb-4"><a class="text-blue-600 hover:underline text-sm" href="/blog">← All Articles</a></div></article></main><!--$--><!--/$--><button class="fixed bottom-6 right-6 z-50 bg-white text-gray-600 border border-gray-200 px-4 py-2 rounded-lg shadow-md hover:shadow-lg hover:border-blue-300 hover:text-blue-600 transition-all text-sm font-medium">💡 Suggest a Feature</button><script src="/_next/static/chunks/ffb55e4afe8329f4.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"default\"]\n4:I[22016,[\"/_next/static/chunks/4c37ef8cd80d432b.js\",\"/_next/static/chunks/7c92e96509cd355e.js\"],\"\"]\n5:I[29497,[\"/_next/static/chunks/4c37ef8cd80d432b.js\"],\"default\"]\n6:I[73833,[\"/_next/static/chunks/4c37ef8cd80d432b.js\"],\"default\"]\n8:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"ViewportBoundary\"]\nd:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"MetadataBoundary\"]\nf:I[68027,[],\"default\"]\n:HL[\"/_next/static/chunks/4140576b38c15f94.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"x5ZdVJdISuYiYmY-sEmrS\",\"c\":[\"\",\"blog\",\"mermaid-accessibility-a11y\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"blog\",{\"children\":[[\"slug\",\"mermaid-accessibility-a11y\",\"d\"],{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/4140576b38c15f94.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/4c37ef8cd80d432b.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"meta\",null,{\"name\":\"msvalidate.01\",\"content\":\"E8526A596FF6783F9177B38EF141F88C\"}]}],[\"$\",\"body\",null,{\"className\":\"antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"main\",null,{\"className\":\"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 p-6 font-sans flex items-center justify-center\",\"children\":[\"$\",\"section\",null,{\"className\":\"max-w-xl rounded-2xl border border-gray-100 bg-white p-8 text-center shadow-sm\",\"children\":[[\"$\",\"p\",null,{\"className\":\"text-sm font-semibold uppercase tracking-wide text-blue-600\",\"children\":\"404\"}],[\"$\",\"h1\",null,{\"className\":\"mt-3 text-3xl font-bold text-gray-900\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"mt-4 text-gray-600\",\"children\":\"The MermaidEditor page you requested does not exist or has moved.\"}],[\"$\",\"div\",null,{\"className\":\"mt-6 flex flex-wrap justify-center gap-3\",\"children\":[[\"$\",\"$L4\",null,{\"href\":\"/\",\"className\":\"rounded-lg bg-blue-600 px-4 py-2 text-sm font-semibold text-white hover:bg-blue-700\",\"children\":\"Open editor\"}],[\"$\",\"$L4\",null,{\"href\":\"/blog\",\"className\":\"rounded-lg border border-blue-200 bg-white px-4 py-2 text-sm font-semibold text-blue-600 hover:bg-blue-50\",\"children\":\"Browse tutorials\"}]]}]]}]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}],[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[\"$L7\",[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/7c92e96509cd355e.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"7:[[\"$\",\"script\",null,{\"id\":\"json-ld-article\",\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"{\\\"@context\\\":\\\"https://schema.org\\\",\\\"@type\\\":\\\"BlogPosting\\\",\\\"headline\\\":\\\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\\\",\\\"description\\\":\\\"Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.\\\",\\\"datePublished\\\":\\\"2026-09-08T00:00:00.000Z\\\",\\\"dateModified\\\":\\\"2026-09-08T00:00:00.000Z\\\",\\\"url\\\":\\\"https://mermaideditor.lol/blog/mermaid-accessibility-a11y\\\",\\\"image\\\":\\\"https://mermaideditor.lol/og?title=Mermaid.js%20Accessibility%20Guide%3A%20Making%20Diagrams%20Screen-Reader%20Friendly\u0026subtitle=Mermaid+Live+Editor+Blog\\\",\\\"author\\\":{\\\"@id\\\":\\\"https://mermaideditor.lol/about/gagan-thakur#person\\\"},\\\"publisher\\\":{\\\"@id\\\":\\\"https://mermaideditor.lol/#organization\\\"},\\\"mainEntityOfPage\\\":{\\\"@type\\\":\\\"WebPage\\\",\\\"@id\\\":\\\"https://mermaideditor.lol/blog/mermaid-accessibility-a11y\\\"}}\"}}],[\"$\",\"script\",null,{\"id\":\"json-ld-breadcrumb\",\"type\":\"application/ld+json\",\"dangerouslySetInnerHTML\":{\"__html\":\"{\\\"@context\\\":\\\"https://schema.org\\\",\\\"@type\\\":\\\"BreadcrumbList\\\",\\\"itemListElement\\\":[{\\\"@type\\\":\\\"ListItem\\\",\\\"position\\\":1,\\\"name\\\":\\\"Home\\\",\\\"item\\\":\\\"https://mermaideditor.lol\\\"},{\\\"@type\\\":\\\"ListItem\\\",\\\"position\\\":2,\\\"name\\\":\\\"Blog\\\",\\\"item\\\":\\\"https://mermaideditor.lol/blog\\\"},{\\\"@type\\\":\\\"ListItem\\\",\\\"position\\\":3,\\\"name\\\":\\\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\\\",\\\"item\\\":\\\"https://mermaideditor.lol/blog/mermaid-accessibility-a11y\\\"}]}\"}}],\"$undefined\",[\"$\",\"main\",null,{\"className\":\"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 p-4 md:p-8 font-sans\",\"children\":[\"$\",\"article\",null,{\"className\":\"max-w-3xl mx-auto\",\"children\":[[\"$\",\"div\",null,{\"className\":\"mb-8\",\"children\":[\"$\",\"$L4\",null,{\"href\":\"/blog\",\"className\":\"text-blue-600 hover:underline text-sm\",\"children\":\"← All Articles\"}]}],[\"$\",\"header\",null,{\"className\":\"mb-10\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex flex-wrap items-center gap-3 text-sm text-gray-500 mb-3\",\"children\":[[\"$\",\"span\",null,{\"children\":\"By\"}],[\"$\",\"$L4\",null,{\"href\":\"/about/gagan-thakur\",\"className\":\"text-purple-600 hover:underline font-medium\",\"rel\":\"author\",\"children\":\"Gagan Thakur\"}],[\"$\",\"span\",null,{\"children\":\"·\"}],[\"$\",\"time\",null,{\"dateTime\":\"2026-09-08T00:00:00.000Z\",\"children\":[\"Updated \",\"Sep 2026\"]}]]}],[\"$\",\"h1\",null,{\"className\":\"text-3xl md:text-4xl font-bold text-gray-900 mt-2 mb-4\",\"children\":\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}],[\"$\",\"p\",null,{\"className\":\"text-lg text-gray-600\",\"children\":\"Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.\"}]]}],[\"$\",\"figure\",null,{\"className\":\"mb-8 overflow-hidden rounded-2xl border border-gray-100 bg-white p-4 shadow-sm\",\"children\":[[\"$\",\"img\",null,{\"src\":\"/diagrams/blog/mermaid-accessibility-a11y.svg\",\"alt\":\"Rendered Mermaid diagram example for Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\",\"width\":960,\"height\":540,\"loading\":\"lazy\",\"className\":\"h-auto w-full rounded-xl bg-white\"}],[\"$\",\"figcaption\",null,{\"className\":\"mt-3 text-sm text-gray-500\",\"children\":\"Rendered Mermaid diagram example from this tutorial.\"}]]}],[\"$\",\"div\",null,{\"className\":\"bg-white rounded-2xl p-6 md:p-10 shadow-sm border border-gray-100\",\"children\":[[\"$\",\"p\",\"1\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"# Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}}],[\"$\",\"p\",\"3\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Mermaid.js is the de facto standard for text-to-diagram rendering in developer docs. But out of the box, rendered SVG diagrams are invisible to screen readers. Every \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003crect\u003e\u003c/code\u003e, \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003cpath\u003e\u003c/code\u003e, and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003ctext\u003e\u003c/code\u003e element sits in the DOM without any semantic meaning.\"}}],\"$L10\",\"$L11\",\"$L12\",\"$L13\",\"$L14\",\"$L15\",\"$L16\",\"$L17\",\"$L18\",\"$L19\",\"$L1a\",\"$L1b\",\"$L1c\",\"$L1d\",\"$L1e\",\"$L1f\",\"$L20\",\"$L21\",\"$L22\",\"$L23\",\"$L24\",\"$L25\",\"$L26\",\"$L27\",\"$L28\",\"$L29\",\"$L2a\",\"$L2b\",\"$L2c\",\"$L2d\",\"$L2e\",\"$L2f\",\"$L30\",\"$L31\",\"$L32\",\"$L33\",\"$L34\",\"$L35\",\"$L36\",\"$L37\",\"$L38\",\"$L39\",\"$L3a\",\"$L3b\",\"$L3c\",\"$L3d\",\"$L3e\",\"$L3f\",\"$L40\",\"$L41\",\"$L42\",\"$L43\",\"$L44\",\"$L45\",\"$L46\",\"$L47\",\"$L48\",\"$L49\",\"$L4a\",\"$L4b\",\"$L4c\",\"$L4d\",\"$L4e\",\"$L4f\",\"$L50\",\"$L51\"]}],\"$L52\",\"$L53\",\"$L54\"]}]}]]\n"])</script><script>self.__next_f.push([1,"10:[\"$\",\"p\",\"5\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"If your docs live on a public site, an internal wiki, or a product help center, inaccessible diagrams mean you are shutting out users who rely on assistive technology — and potentially violating WCAG 2.1 requirements.\"}}]\n11:[\"$\",\"p\",\"7\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"This guide covers every technique available in Mermaid 10+ to make diagrams accessible: ARIA attributes, descriptive text, accessible color palettes, and integration patterns for common platforms.\"}}]\n12:[\"$\",\"h2\",\"9\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"The Problem: Mermaid SVG Is Not Accessible by Default\"}]\n13:[\"$\",\"p\",\"11\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"A Mermaid flowchart rendered from this source:\"}}]\n14:[\"$\",\"div\",\"code-0\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"graph TD\\n A[Login] --\u003e B{Dashboard}\\n B --\u003e|Admin| C[Admin Panel]\\n B --\u003e|User| D[User Profile]\"}]}],[\"$\",\"a\",null,{\"href\":\"/?code=Z3JhcGggVEQKICAgIEFbTG9naW5dIC0tPiBCe0Rhc2hib2FyZH0KICAgIEIgLS0+fEFkbWlufCBDW0FkbWluIFBhbmVsXQogICAgQiAtLT58VXNlcnwgRFtVc2VyIFByb2ZpbGVd\",\"className\":\"inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 font-medium mb-4 -mt-2\",\"children\":\"Try in Editor →\"}]]}]\n15:[\"$\",\"p\",\"20\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Produces SVG output that a screen reader encounters as an opaque blob of vector paths. There are no landmark roles, no heading structure, no text alternatives. The user hears nothing useful.\"}}]\n16:[\"$\",\"h2\",\"22\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Solution 1: The `accessibility` Config (Mermaid 10.3+)\"}]\n17:[\"$\",\"p\",\"24\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Mermaid 10.3 introduced a dedicated \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccessibility\u003c/code\u003e configuration object. This is the most important feature for diagram accessibility:\"}}]\n18:[\"$\",\"div\",\"code-1\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"mermaid.initialize({\\n accessibility: {\\n title: \\\"User Authentication Flow\\\",\\n description: \\\"Flowchart showing login redirecting to Admin Panel or User Profile based on role\\\",\\n svgRole: \\\"img\\\"\\n }\\n});\"}]}],false]}]\n19:[\"$\",\"h3\",\"36\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"What Each Setting Does\"}]\n"])</script><script>self.__next_f.push([1,"1a:[\"$\",\"div\",\"38\",{\"className\":\"overflow-x-auto my-4\",\"children\":[\"$\",\"table\",null,{\"className\":\"min-w-full text-sm border border-gray-200 rounded\",\"children\":[[\"$\",\"thead\",null,{\"className\":\"bg-gray-50\",\"children\":[\"$\",\"tr\",null,{\"children\":[[\"$\",\"th\",\"0\",{\"className\":\"px-4 py-2 text-left font-semibold text-gray-700 border-b\",\"children\":\"Option\"}],[\"$\",\"th\",\"1\",{\"className\":\"px-4 py-2 text-left font-semibold text-gray-700 border-b\",\"children\":\"Values\"}],[\"$\",\"th\",\"2\",{\"className\":\"px-4 py-2 text-left font-semibold text-gray-700 border-b\",\"children\":\"Effect\"}]]}]}],[\"$\",\"tbody\",null,{\"children\":[[\"$\",\"tr\",\"0\",{\"className\":\"\",\"children\":[[\"$\",\"td\",\"0\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"`title`\"}}],[\"$\",\"td\",\"1\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"string\"}}],[\"$\",\"td\",\"2\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"Sets the `\u003ctitle\u003e` child element inside the SVG — read by screen readers as the accessible name\"}}]]}],[\"$\",\"tr\",\"1\",{\"className\":\"bg-gray-50\",\"children\":[[\"$\",\"td\",\"0\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"`description`\"}}],[\"$\",\"td\",\"1\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"string\"}}],[\"$\",\"td\",\"2\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"Sets the `\u003cdesc\u003e` child element — read as the accessible description\"}}]]}],[\"$\",\"tr\",\"2\",{\"className\":\"\",\"children\":[[\"$\",\"td\",\"0\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"`svgRole`\"}}],[\"$\",\"td\",\"1\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"`\\\"img\\\"` or `\\\"graphics-document\\\"`\"}}],[\"$\",\"td\",\"2\",{\"className\":\"px-4 py-2 text-gray-600 border-b\",\"dangerouslySetInnerHTML\":{\"__html\":\"`\\\"img\\\"` treats the diagram as a single image (default); `\\\"graphics-document\\\"` exposes individual nodes\"}}]]}]]}]]}]}]\n"])</script><script>self.__next_f.push([1,"1b:[\"$\",\"p\",\"44\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole: \\\"img\\\"\u003c/code\u003e is the recommended default. It tells the screen reader to announce the title and description and treat the entire SVG as one element. Users can skip past it or drill in.\"}}]\n1c:[\"$\",\"p\",\"46\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole: \\\"graphics-document\\\"\u003c/code\u003e makes each node individually navigable — useful for large architectural diagrams where exploring node-by-node is the goal.\"}}]\n1d:[\"$\",\"h3\",\"48\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"Complete Example: Accessible Flowchart\"}]\n1e:[\"$\",\"div\",\"code-2\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"\u003cpre class=\\\"mermaid\\\"\u003e\\ngraph TD\\n A[Start] --\u003e B{Is User Logged In?}\\n B --\u003e|Yes| C[Load Dashboard]\\n B --\u003e|No| D[Redirect to Login]\\n\u003c/pre\u003e\\n\u003cscript src=\\\"https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js\\\"\u003e\u003c/script\u003e\\n\u003cscript\u003e\\nmermaid.initialize({\\n startOnLoad: true,\\n accessibility: {\\n title: \\\"Login Decision Flow\\\",\\n description: \\\"Decision tree: if user is logged in, load dashboard; otherwise redirect to login page\\\",\\n svgRole: \\\"img\\\"\\n }\\n});\\n\u003c/script\u003e\"}]}],false]}]\n1f:[\"$\",\"p\",\"70\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Screen reader output: *\\\"Login Decision Flow — image. Decision tree: if user is logged in, load dashboard; otherwise redirect to login page.\\\"*\"}}]\n20:[\"$\",\"h2\",\"72\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Solution 2: Per-Diagram ARIA with `%%{init}``\"}]\n21:[\"$\",\"p\",\"74\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"When you have multiple diagrams on one page, set accessibility metadata per-diagram using the \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e%%{init}\u003c/code\u003e` directive:\"}}]\n22:[\"$\",\"div\",\"code-3\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"%%{init: { \\\"accessibility\\\": { \\\"title\\\": \\\"Microservices Data Flow\\\", \\\"description\\\": \\\"Data moving from API Gateway through Auth Service to Database\\\", \\\"svgRole\\\": \\\"img\\\" } } }%%\\ngraph LR\\n Client --\u003e Gateway\\n Gateway --\u003e Auth\\n Auth --\u003e DB\"}]}],[\"$\",\"a\",null,{\"href\":\"/?code=JSV7aW5pdDogeyAiYWNjZXNzaWJpbGl0eSI6IHsgInRpdGxlIjogIk1pY3Jvc2VydmljZXMgRGF0YSBGbG93IiwgImRlc2NyaXB0aW9uIjogIkRhdGEgbW92aW5nIGZyb20gQVBJIEdhdGV3YXkgdGhyb3VnaCBBdXRoIFNlcnZpY2UgdG8gRGF0YWJhc2UiLCAic3ZnUm9sZSI6ICJpbWciIH0gfSB9JSUKZ3JhcGggTFIKICAgIENsaWVudCAtLT4gR2F0ZXdheQogICAgR2F0ZXdheSAtLT4gQXV0aAogICAgQXV0aCAtLT4gREI=\",\"className\":\"inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 font-medium mb-4 -mt-2\",\"children\":\"Try in Editor →\"}]]}]\n23:[\"$\",\"p\",\"84\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"This overrides the global \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccessibility\u003c/code\u003e config for that specific diagram only.\"}}]\n24:[\"$\",\"h2\",\"86\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Solution 3: Node-Level Descriptions with `accDescr`\"}]\n25:[\"$\",\"p\",\"88\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Mermaid 10.4+ supports per-node accessible descriptions using a special syntax:\"}}]\n26:[\"$\",\"div\",\"code-4\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"graph TD\\n A[\\\"Login Page\u003cbr/\u003eaccDescr: Username and password form with submit button\\\"]\\n B[\\\"Dashboard\u003cbr/\u003eaccDescr: Main overview showing charts, recent activity, and quick actions\\\"]\"}]}],[\"$\""])</script><script>self.__next_f.push([1,",\"a\",null,{\"href\":\"/?code=Z3JhcGggVEQKICAgIEFbIkxvZ2luIFBhZ2U8YnIvPmFjY0Rlc2NyOiBVc2VybmFtZSBhbmQgcGFzc3dvcmQgZm9ybSB3aXRoIHN1Ym1pdCBidXR0b24iXQogICAgQlsiRGFzaGJvYXJkPGJyLz5hY2NEZXNjcjogTWFpbiBvdmVydmlldyBzaG93aW5nIGNoYXJ0cywgcmVjZW50IGFjdGl2aXR5LCBhbmQgcXVpY2sgYWN0aW9ucyJd\",\"className\":\"inline-flex items-center gap-1 text-sm text-blue-600 hover:text-blue-800 font-medium mb-4 -mt-2\",\"children\":\"Try in Editor →\"}]]}]\n27:[\"$\",\"p\",\"96\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"When \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole\u003c/code\u003e is set to \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\\\"graphics-document\\\"\u003c/code\u003e, each node's \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccDescr\u003c/code\u003e is exposed as the accessible description for that individual SVG group element.\"}}]\n28:[\"$\",\"p\",\"98\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eNote:\u003c/strong\u003e \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccDescr\u003c/code\u003e is still experimental in Mermaid 10.x. Test with your target screen reader (NVDA, JAWS, VoiceOver) before relying on it in production.\"}}]\n29:[\"$\",\"h2\",\"100\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Solution 4: Wrapping Diagrams in Semantic HTML\"}]\n2a:[\"$\",\"p\",\"102\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"The simplest and most reliable approach for any Mermaid version — wrap the diagram in a \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003cfigure\u003e\u003c/code\u003e with explicit \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003earia-\u003c/code\u003e attributes:\"}}]\n2b:[\"$\",\"div\",\"code-5\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"\u003cfigure role=\\\"img\\\" aria-labelledby=\\\"diagram-caption\\\" aria-describedby=\\\"diagram-desc\\\"\u003e\\n \u003cfigcaption id=\\\"diagram-caption\\\"\u003eUser Authentication Flow\u003c/figcaption\u003e\\n \u003cp id=\\\"diagram-desc\\\" class=\\\"sr-only\\\"\u003e\\n Flowchart showing login page redirecting authenticated users to the dashboard\\n and unauthenticated users back to the login page with an error message.\\n \u003c/p\u003e\\n \u003cpre class=\\\"mermaid\\\"\u003e\\n graph TD\\n A[Login] --\u003e B{Valid?}\\n B --\u003e|Yes| C[Dashboard]\\n B --\u003e|No| D[Error]\\n \u003c/pre\u003e\\n\u003c/figure\u003e\"}]}],false]}]\n2c:[\"$\",\"p\",\"120\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"The \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e.sr-only\u003c/code\u003e class (screen-reader-only) hides the description visually while keeping it in the accessibility tree:\"}}]\n2d:[\"$\",\"div\",\"code-6\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\".sr-only {\\n position: absolute;\\n width: 1px;\\n height: 1px;\\n padding: 0;\\n margin: -1px;\\n overflow: hidden;\\n clip: rect(0, 0, 0, 0);\\n white-space: nowrap;\\n border: 0;\\n}\"}]}],false]}]\n2e:[\"$\",\"h2\",\"136\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Accessible Color Palettes\"}]\n2f:[\"$\",\"p\",\"138\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Color-blind users (roughly 8% of males) may not distinguish red/green node colors. Use Mermaid themes or custom \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003ethemeVariables\u003c/code\u003e with accessible palettes:\"}}]\n30:[\"$\",\"div\",\"code-7\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"mermaid.initialize({\\n theme: 'base',\\n themeVariables: {\\n // Accessible palette: high contrast, colorblind-safe\\n primaryColor: '#4A90D9', // Blue instead of red\\n primaryTextColor: '#FFFFFF',\\n secondaryColor: '#F5A623', // Orange instead of green\\n tertiaryColor: '#7B68EE', // Medium slate blue\\n lineColor: '#333333',\\n textColo"])</script><script>self.__next_f.push([1,"r: '#1A1A1A'\\n }\\n});\"}]}],false]}]\n31:[\"$\",\"p\",\"155\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Tools to validate your palette:\"}}]\n32:[\"$\",\"p\",\"156\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- \u003ca href=\\\"https://webaim.org/resources/contrastchecker/\\\" class=\\\"text-blue-600 hover:underline\\\"\u003eWebAIM Contrast Checker\u003c/a\u003e — ensure 4.5:1 ratio for normal text\"}}]\n33:[\"$\",\"p\",\"157\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- \u003ca href=\\\"https://www.color-blindness.com/coblis-color-blindness-simulator/\\\" class=\\\"text-blue-600 hover:underline\\\"\u003eCoblis Color Blindness Simulator\u003c/a\u003e — preview how your diagram looks with different types of color blindness\"}}]\n34:[\"$\",\"p\",\"158\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- Mermaid's built-in \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eneutral\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eforest\u003c/code\u003e themes already use high-contrast accessible defaults\"}}]\n35:[\"$\",\"h2\",\"160\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Platform-Specific Tips\"}]\n36:[\"$\",\"h3\",\"162\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"GitHub Markdown\"}]\n37:[\"$\",\"p\",\"163\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"GitHub's Mermaid renderer automatically applies \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole: \\\"img\\\"\u003c/code\u003e with the diagram code as the accessible name. You cannot customize title/description in GitHub markdown — wrap your code block in an HTML \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003cfigure\u003e\u003c/code\u003e with \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003earia-\u003c/code\u003e attributes instead.\"}}]\n38:[\"$\",\"h3\",\"165\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"Docusaurus\"}]\n39:[\"$\",\"div\",\"code-8\",{\"children\":[[\"$\",\"pre\",null,{\"className\":\"bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto text-sm my-4\",\"children\":[\"$\",\"code\",null,{\"children\":\"// docusaurus.config.js\\nthemeConfig: {\\n mermaid: {\\n options: {\\n accessibility: {\\n title: \\\"\\\", // set per-diagram via %%{init}\\n description: \\\"\\\",\\n svgRole: \\\"img\\\"\\n }\\n }\\n }\\n}\"}]}],false]}]\n3a:[\"$\",\"h3\",\"181\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"MermaidEditor.lol\"}]\n3b:[\"$\",\"p\",\"182\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003ca href=\\\"https://mermaideditor.lol\\\" class=\\\"text-blue-600 hover:underline\\\"\u003eMermaidEditor\u003c/a\u003e renders diagrams client-side. Copy the SVG output and add \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003ctitle\u003e\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003cdesc\u003e\u003c/code\u003e elements manually before embedding in your page — or use the PNG export and add \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003ealt\u003c/code\u003e text on the \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\u003cimg\u003e\u003c/code\u003e tag.\"}}]\n3c:[\"$\",\"h3\",\"184\",{\"className\":\"text-xl font-semibold text-gray-800 mt-8 mb-3\",\"children\":\"Notion / Confluence / Obsidian\"}]\n3d:[\"$\",\"p\",\"185\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"These platforms embed Mermaid as static images. The only accessible path is to add a caption or alt text in the platform's own image block settings.\"}}]\n3e:[\"$\",\"h2\",\"187\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Testing Your Diagrams for Accessibility\"}]\n3f:[\"$\",\"ol\",\"189\",{\"className\":\"list-decimal pl-6 my-3 space-y-1 text-gray-700\",\"children\":[[\"$\",\"li\",\"0\",{\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eaxe DevTools\u003c/strong\u003e (browser extension): Run an automated audit. It flags SVGs missing accessible names.\"}}],[\"$\",\"li\",\"1\",{\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eScreen reader manual test\u003c/strong\u003e: Open your page in Chrome wit"])</script><script>self.__next_f.push([1,"h \u003ca href=\\\"https://chromewebstore.google.com/detail/screen-reader/kgejglhpjiefppelpmljglcjbhoiplfn\\\" class=\\\"text-blue-600 hover:underline\\\"\u003eChromeVox\u003c/a\u003e or use VoiceOver (macOS) / NVDA (Windows). Navigate to the diagram and listen.\"}}],[\"$\",\"li\",\"2\",{\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eLighthouse\u003c/strong\u003e: The accessibility audit in Chrome DevTools checks for image alt text — it will flag bare SVGs without \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003erole=\\\"img\\\"\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003earia-label\u003c/code\u003e.\"}}]]}]\n40:[\"$\",\"h2\",\"193\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"Quick Checklist\"}]\n41:[\"$\",\"p\",\"195\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] Every diagram has a \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003etitle\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003edescription\u003c/code\u003e set via \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccessibility\u003c/code\u003e config or \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e%%{init}\u003c/code\u003e`\"}}]\n42:[\"$\",\"p\",\"196\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole\u003c/code\u003e is explicitly set to \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\\\"img\\\"\u003c/code\u003e or \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\\\"graphics-document\\\"\u003c/code\u003e\"}}]\n43:[\"$\",\"p\",\"197\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] Color palette passes WCAG AA contrast (4.5:1 minimum)\"}}]\n44:[\"$\",\"p\",\"198\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] Red/green are never the sole differentiators between node meanings\"}}]\n45:[\"$\",\"p\",\"199\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] Large diagrams have a text summary adjacent in the page\"}}]\n46:[\"$\",\"p\",\"200\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"- [ ] Tested with at least one actual screen reader\"}}]\n47:[\"$\",\"h2\",\"202\",{\"className\":\"text-2xl font-bold text-gray-800 mt-10 mb-4\",\"children\":\"FAQ\"}]\n48:[\"$\",\"p\",\"204\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eDoes Mermaid support WCAG 2.1 AA compliance?\u003c/strong\u003e\"}}]\n49:[\"$\",\"p\",\"205\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Mermaid itself does not guarantee compliance — it is a rendering library. But with the \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccessibility\u003c/code\u003e config, proper color choices, and semantic HTML wrappers, you can build WCAG AA-compliant pages that include Mermaid diagrams.\"}}]\n4a:[\"$\",\"p\",\"207\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eCan screen readers read text inside Mermaid nodes?\u003c/strong\u003e\"}}]\n4b:[\"$\",\"p\",\"208\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Only if \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole\u003c/code\u003e is set to \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003e\\\"graphics-document\\\"\u003c/code\u003e AND you have added \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccDescr\u003c/code\u003e to each node (Mermaid 10.4+). For broader compatibility, use \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003esvgRole: \\\"img\\\"\u003c/code\u003e with a comprehensive title and description — this is the approach most platforms use.\"}}]\n4c:[\"$\",\"p\",\"210\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eWhat about keyboard navigation within diagrams?\u003c/strong\u003e\"}}]\n4d:[\"$\",\"p\",\"211\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Mermaid does not currently support keyboard-navigable diagrams out of the box. For interactive exploration of complex diagrams, consider exporti"])</script><script>self.__next_f.push([1,"ng the SVG and adding your own tab-indexable elements, or providing a text-based table equivalent of the diagram structure.\"}}]\n4e:[\"$\",\"p\",\"213\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eAre Mermaid themes accessible?\u003c/strong\u003e\"}}]\n4f:[\"$\",\"p\",\"214\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"The \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eneutral\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eforest\u003c/code\u003e themes use high-contrast color pairs. The \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003edefault\u003c/code\u003e and \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003edark\u003c/code\u003e themes may fail contrast checks. Always verify with WebAIM or axe DevTools.\"}}]\n50:[\"$\",\"p\",\"216\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"\u003cstrong\u003eIs there a Mermaid plugin that handles accessibility automatically?\u003c/strong\u003e\"}}]\n51:[\"$\",\"p\",\"217\",{\"className\":\"text-gray-700 leading-relaxed my-3\",\"dangerouslySetInnerHTML\":{\"__html\":\"Not yet. The \u003ccode class=\\\"bg-gray-100 px-1.5 py-0.5 rounded text-sm\\\"\u003eaccessibility\u003c/code\u003e config in Mermaid 10.3+ is the official solution. Community plugins for popular SSGs (Docusaurus, MkDocs) are beginning to add auto-generated descriptions from diagram source code, but these are still experimental.\"}}]\n52:[\"$\",\"aside\",null,{\"className\":\"mt-12 p-6 bg-purple-50 rounded-xl border border-purple-100\",\"children\":[[\"$\",\"h3\",null,{\"className\":\"text-sm font-semibold text-purple-700 uppercase tracking-wide mb-4\",\"children\":\"Continue Learning\"}],[\"$\",\"ul\",null,{\"className\":\"space-y-2\",\"children\":[[\"$\",\"li\",\"/\",{\"children\":[\"$\",\"$L4\",null,{\"href\":\"/\",\"className\":\"text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium\",\"children\":\"Try the free Mermaid Live Editor →\"}]}],[\"$\",\"li\",\"/cheat-sheet\",{\"children\":[\"$\",\"$L4\",null,{\"href\":\"/cheat-sheet\",\"className\":\"text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium\",\"children\":\"Mermaid Syntax Cheat Sheet\"}]}],[\"$\",\"li\",\"/templates\",{\"children\":[\"$\",\"$L4\",null,{\"href\":\"/templates\",\"className\":\"text-purple-700 hover:text-purple-900 hover:underline text-sm font-medium\",\"children\":\"Mermaid Diagram Templates\"}]}]]}]]}]\n53:[\"$\",\"div\",null,{\"className\":\"mt-10 text-center\",\"children\":[\"$\",\"$L4\",null,{\"href\":\"/\",\"className\":\"inline-block bg-gradient-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:opacity-90 transition-opacity\",\"children\":\"Try it now in our free Mermaid Live Editor →\"}]}]\n54:[\"$\",\"div\",null,{\"className\":\"mt-8 mb-4\",\"children\":[\"$\",\"$L4\",null,{\"href\":\"/blog\",\"className\":\"text-blue-600 hover:underline text-sm\",\"children\":\"← All Articles\"}]}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"55:I[27201,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/a2dfb6fc5208ab9b.js\"],\"IconMark\"]\na:null\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"title\",\"0\",{\"children\":\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"author\",\"href\":\"https://www.linkedin.com/in/gaganthakur\"}],[\"$\",\"meta\",\"3\",{\"name\":\"author\",\"content\":\"Gagan Thakur\"}],[\"$\",\"meta\",\"4\",{\"name\":\"keywords\",\"content\":\"mermaid accessibility,mermaid js a11y,accessible mermaid diagrams,mermaid screen reader,mermaid aria labels,wcag diagrams,mermaid alt text,accessible flowcharts\"}],[\"$\",\"meta\",\"5\",{\"name\":\"creator\",\"content\":\"Gagan Thakur\"}],[\"$\",\"meta\",\"6\",{\"name\":\"robots\",\"content\":\"index, follow\"}],[\"$\",\"link\",\"7\",{\"rel\":\"canonical\",\"href\":\"https://mermaideditor.lol/blog/mermaid-accessibility-a11y\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:title\",\"content\":\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:description\",\"content\":\"Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:url\",\"content\":\"https://mermaideditor.lol/blog/mermaid-accessibility-a11y\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image\",\"content\":\"https://mermaideditor.lol/og?title=Mermaid.js%20Accessibility%20Guide%3A%20Making%20Diagrams%20Screen-Reader%20Friendly\u0026subtitle=Mermaid+Live+Editor+Blog\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:alt\",\"content\":\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:type\",\"content\":\"article\"}],[\"$\",\"meta\",\"16\",{\"property\":\"article:published_time\",\"content\":\"2026-09-08T00:00:00.000Z\"}],[\"$\",\"meta\",\"17\",{\"property\":\"article:author\",\"content\":\"https://www.linkedin.com/in/gaganthakur\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:title\",\"content\":\"Mermaid.js Accessibility Guide: Making Diagrams Screen-Reader Friendly\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:description\",\"content\":\"Learn how to add ARIA labels, alt text, and accessible descriptions to Mermaid.js diagrams so they work with screen readers and meet WCAG standards.\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image\",\"content\":\"https://mermaideditor.lol/og?title=Mermaid.js%20Accessibility%20Guide%3A%20Making%20Diagrams%20Screen-Reader%20Friendly\u0026subtitle=Mermaid+Live+Editor+Blog\"}],[\"$\",\"link\",\"22\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.8f0a2a03.ico\",\"sizes\":\"64x64\",\"type\":\"image/x-icon\"}],[\"$\",\"$L55\",\"23\",{}]]\n"])</script></body></html>