Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions desktop-app/resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ <h5>Menu</h5>
</header>

<!-- Tab Bar -->
<div class="tab-bar" id="tab-bar" role="tablist" aria-label="Document tabs">
<div class="tab-list" id="tab-list"></div>
<div class="tab-bar" id="tab-bar">
<div class="tab-list" id="tab-list" role="tablist" aria-label="Document tabs"></div>
<button class="tab-reset-btn" id="tab-reset-btn" title="Reset all files" aria-label="Reset all files">
<i class="bi bi-arrow-counterclockwise"></i> Reset
</button>
Expand Down Expand Up @@ -778,10 +778,10 @@ <h3 class="modal-section-title">Open-source credits</h3>
</div>
</div>

<div class="content-container">
<main class="content-container">
<div class="editor-pane is-loading">
<div id="line-numbers" class="line-numbers" aria-hidden="true"></div>
<div id="editor-highlight-layer" class="editor-highlight-layer" aria-hidden="true"></div>
<div id="editor-highlight-layer" class="editor-highlight-layer" aria-hidden="true" tabindex="-1"></div>
<div class="editor-skeleton" id="editor-skeleton" aria-hidden="true">
<div class="skeleton-placeholder skeleton-title"></div>
<div class="skeleton-placeholder skeleton-line skeleton-w90"></div>
Expand Down Expand Up @@ -818,7 +818,7 @@ <h3 class="modal-section-title">Open-source credits</h3>
</div>
</div>
</div>
</div>
</main>
</div>

<!-- Mermaid Zoom Modal -->
Expand Down
20 changes: 18 additions & 2 deletions desktop-app/resources/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,14 @@ document.addEventListener("DOMContentLoaded", function () {
enhanceGitHubAlerts(markdownPreview);

processEmojis(markdownPreview);

// Add accessible dynamic labels to task list checkboxes matching their parent text
markdownPreview.querySelectorAll('input[type="checkbox"]').forEach(function(input) {
if (!input.hasAttribute('aria-label')) {
const parentText = input.parentElement ? input.parentElement.textContent.trim() : '';
input.setAttribute('aria-label', parentText || 'Task item');
}
});
Comment on lines +1522 to +1528

// PERF-002: Lazy-load mermaid only when diagrams are present
try {
Expand Down Expand Up @@ -1559,7 +1567,11 @@ document.addEventListener("DOMContentLoaded", function () {
if (hasMath) {
if (window.MathJax) {
try {
MathJax.typesetPromise([markdownPreview]).catch((err) => {
MathJax.typesetPromise([markdownPreview]).then(function() {
markdownPreview.querySelectorAll('mjx-container[tabindex="0"]').forEach(function(mjx) {
mjx.removeAttribute('tabindex');
});
}).catch(function(err) {
console.warn('MathJax typesetting failed:', err);
});
} catch (e) {
Expand All @@ -1578,7 +1590,11 @@ document.addEventListener("DOMContentLoaded", function () {
};
loadScript(CDN.mathjax).then(function() {
try {
MathJax.typesetPromise([markdownPreview]).catch(function(err) {
MathJax.typesetPromise([markdownPreview]).then(function() {
markdownPreview.querySelectorAll('mjx-container[tabindex="0"]').forEach(function(mjx) {
mjx.removeAttribute('tabindex');
});
}).catch(function(err) {
console.warn('MathJax typesetting failed:', err);
});
} catch (e) {
Expand Down
8 changes: 4 additions & 4 deletions desktop-app/resources/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ a:focus {
--color-prettylights-syntax-entity: #6f42c1;
--color-prettylights-syntax-storage-modifier-import: #24292e;
--color-prettylights-syntax-entity-tag: #22863a;
--color-prettylights-syntax-keyword: #d73a49;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #032f62;
--color-prettylights-syntax-variable: #e36209;
--color-prettylights-syntax-brackethighlighter-unmatched: #b31d28;
Expand Down Expand Up @@ -1732,7 +1732,7 @@ a:focus {
display: flex;
align-items: center;
gap: 6px;
height: 27px;
height: 32px;
padding: 0 8px 0 10px;
min-width: 100px;
max-width: 180px;
Expand Down Expand Up @@ -1874,8 +1874,8 @@ a:focus {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
width: 22px;
height: 22px;
border-radius: 3px;
background: none;
border: none;
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ <h5>Menu</h5>
</header>

<!-- Tab Bar -->
<div class="tab-bar" id="tab-bar" role="tablist" aria-label="Document tabs">
<div class="tab-list" id="tab-list"></div>
<div class="tab-bar" id="tab-bar">
<div class="tab-list" id="tab-list" role="tablist" aria-label="Document tabs"></div>
<button class="tab-reset-btn" id="tab-reset-btn" title="Reset all files" aria-label="Reset all files">
<i class="bi bi-arrow-counterclockwise"></i> Reset
</button>
Expand Down Expand Up @@ -837,10 +837,10 @@ <h3 class="modal-section-title">Open-source credits</h3>
</div>
</div>

<div class="content-container">
<main class="content-container">
<div class="editor-pane is-loading">
<div id="line-numbers" class="line-numbers" aria-hidden="true"></div>
<div id="editor-highlight-layer" class="editor-highlight-layer" aria-hidden="true"></div>
<div id="editor-highlight-layer" class="editor-highlight-layer" aria-hidden="true" tabindex="-1"></div>
<div class="editor-skeleton" id="editor-skeleton" aria-hidden="true">
<div class="skeleton-placeholder skeleton-title"></div>
<div class="skeleton-placeholder skeleton-line skeleton-w90"></div>
Expand Down Expand Up @@ -877,7 +877,7 @@ <h3 class="modal-section-title">Open-source credits</h3>
</div>
</div>
</div>
</div>
</main>
</div>

<!-- Mermaid Zoom Modal -->
Expand Down
20 changes: 18 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,14 @@ document.addEventListener("DOMContentLoaded", function () {
enhanceGitHubAlerts(markdownPreview);

processEmojis(markdownPreview);

// Add accessible dynamic labels to task list checkboxes matching their parent text
markdownPreview.querySelectorAll('input[type="checkbox"]').forEach(function(input) {
if (!input.hasAttribute('aria-label')) {
const parentText = input.parentElement ? input.parentElement.textContent.trim() : '';
input.setAttribute('aria-label', parentText || 'Task item');
}
});
Comment on lines +1522 to +1528

// PERF-002: Lazy-load mermaid only when diagrams are present
try {
Expand Down Expand Up @@ -1559,7 +1567,11 @@ document.addEventListener("DOMContentLoaded", function () {
if (hasMath) {
if (window.MathJax) {
try {
MathJax.typesetPromise([markdownPreview]).catch((err) => {
MathJax.typesetPromise([markdownPreview]).then(function() {
markdownPreview.querySelectorAll('mjx-container[tabindex="0"]').forEach(function(mjx) {
mjx.removeAttribute('tabindex');
});
}).catch(function(err) {
console.warn('MathJax typesetting failed:', err);
});
} catch (e) {
Expand All @@ -1578,7 +1590,11 @@ document.addEventListener("DOMContentLoaded", function () {
};
loadScript(CDN.mathjax).then(function() {
try {
MathJax.typesetPromise([markdownPreview]).catch(function(err) {
MathJax.typesetPromise([markdownPreview]).then(function() {
markdownPreview.querySelectorAll('mjx-container[tabindex="0"]').forEach(function(mjx) {
mjx.removeAttribute('tabindex');
});
}).catch(function(err) {
console.warn('MathJax typesetting failed:', err);
});
} catch (e) {
Expand Down
8 changes: 4 additions & 4 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ a:focus {
--color-prettylights-syntax-entity: #6f42c1;
--color-prettylights-syntax-storage-modifier-import: #24292e;
--color-prettylights-syntax-entity-tag: #22863a;
--color-prettylights-syntax-keyword: #d73a49;
--color-prettylights-syntax-keyword: #cf222e;
--color-prettylights-syntax-string: #032f62;
--color-prettylights-syntax-variable: #e36209;
--color-prettylights-syntax-brackethighlighter-unmatched: #b31d28;
Expand Down Expand Up @@ -1732,7 +1732,7 @@ a:focus {
display: flex;
align-items: center;
gap: 6px;
height: 27px;
height: 32px;
padding: 0 8px 0 10px;
min-width: 100px;
max-width: 180px;
Expand Down Expand Up @@ -1874,8 +1874,8 @@ a:focus {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
width: 22px;
height: 22px;
border-radius: 3px;
background: none;
border: none;
Expand Down
Loading