Skip to content

fix: resolve visual, accessibility, logic, and deployment issues from full audit#112

Merged
ThisIs-Developer merged 2 commits into
mainfrom
fix/audit-visual-a11y-deploy-fixes
May 24, 2026
Merged

fix: resolve visual, accessibility, logic, and deployment issues from full audit#112
ThisIs-Developer merged 2 commits into
mainfrom
fix/audit-visual-a11y-deploy-fixes

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

Summary

This PR addresses 6 bugs across 5 files discovered during a comprehensive audit of the main branch. Changes span frontend visuals, accessibility compliance, application logic, and deployment configuration.

5 files changed · 20 insertions · 17 deletions


Changes

🎨 Visual Fixes — styles.css

Fix 1: Active Tab Vertical Jump

  • Problem: Switching between document tabs caused a 1px vertical shift because .tab-item used border-bottom: none while .tab-item.active applied a 1px solid bottom border, creating inconsistent box sizing.
  • Solution: Changed .tab-item to border-bottom: 1px solid transparent so the space is always reserved, eliminating the jump.
- border-bottom: none;
+ border-bottom: 1px solid transparent;

Fix 2: Mobile Menu Overlay Transition

  • Problem: The mobile sidebar backdrop used display: none / display: block toggling, which prevented CSS transition animations from firing (instant flash instead of smooth fade).
  • Solution: Replaced display toggling with opacity + visibility + pointer-events for a smooth 300ms fade transition.
  .mobile-menu-overlay {
-   display: none;
    opacity: 0;
    visibility: hidden;
+   pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .mobile-menu-overlay.active {
-   display: block;
    opacity: 1;
    visibility: visible;
+   pointer-events: auto;
  }

♿ Accessibility — index.html

Fix 3: Missing Modal aria-hidden Attributes

  • Problem: 11 modal dialogs lacked aria-hidden="true" on their initially-hidden wrapper elements, causing screen readers to announce off-screen content to users.
  • Solution: Added aria-hidden="true" to all 11 affected modals:
Modal Element ID
Reset Confirm reset-confirm-modal
Rename rename-modal
Insert Link link-modal
Insert Reference reference-modal
Insert Image image-modal
Insert Table table-modal
Emoji Picker emoji-modal
Symbols Picker symbols-modal
Markdown Alert alert-modal
GitHub Import github-import-modal
Mermaid Zoom mermaid-zoom-modal

🔧 Logic Fixes — script.js

Fix 4: Find & Replace Capture Group Corruption

  • Problem: The replaceAllMatches() function passed the replacement string directly to String.prototype.replace(), causing regex special sequences ($1, $&, $$, etc.) typed by users as literal text to be interpreted as capture group references — silently corrupting editor content.
  • Solution: Wrapped the replacement in an arrow function () => replacement to ensure literal string substitution.
- markdownEditor.value = markdownEditor.value.replace(regex, replacement);
+ markdownEditor.value = markdownEditor.value.replace(regex, () => replacement);

Fix 5: HTML Export Mermaid Version Drift

  • Problem: The HTML export template embedded Mermaid v10.9.1 via CDN while the main application loads v11.6.0, causing rendering inconsistencies (different syntax support, theme behavior) in exported files.
  • Solution: Updated the CDN reference in the export template to mermaid@11.6.0.
- <script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.1/dist/mermaid.min.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js"></script>

� Deployment Hardening

Fix 6a: Docker Build Context — .dockerignore

  • Problem: The desktop-app/ directory (NeutralinoJS native binaries, logs, developer configs) was being copied into the Nginx web container via the overly broad COPY . instruction, bloating the image size and exposing developer artifacts in the web root.
  • Solution: Appended desktop-app/ exclusion to .dockerignore.

Fix 6b: CI/CD Push Guard — .github/workflows/docker-publish.yml

  • Problem: push: true unconditionally attempted to push container images to GHCR on all trigger events, including pull_request from forks — which would fail due to missing write permissions and produce confusing CI failures.
  • Solution: Changed to conditional push ${{ github.event_name != 'pull_request' }}.
- push: true
+ push: ${{ github.event_name != 'pull_request' }}

Testing

Check Method Result
All role="dialog" have aria-hidden grep for dialogs missing attribute ✅ 0 remaining
Replace uses literal callback grep for () => replacement ✅ Confirmed
Mermaid export version = 11.6.0 grep for mermaid@11.6.0 ✅ Confirmed
No old Mermaid in export grep for mermaid@10.9.1 ✅ None found
desktop-app/ in .dockerignore grep for desktop-app/ ✅ Present
PR push guard in CI/CD grep for conditional push ✅ Conditional

Impact

  • Zero breaking changes — all modifications are backwards-compatible
  • No new dependencies — only existing code is adjusted
  • Minimal diff — 20 insertions, 17 deletions across 5 files

Fixes identified via comprehensive multi-agent audit of the main branch covering frontend, logic, accessibility, and deployment layers.

… audit

Visual fixes:
- Fix active tab 1px vertical jump by using transparent bottom border
- Smooth mobile menu overlay transitions using opacity/visibility instead of display

Accessibility:
- Add aria-hidden="true" to 11 modal dialogs missing the attribute

Logic fixes:
- Fix Find & Replace capture group corruption by wrapping replacement in arrow function
- Align HTML export Mermaid version from v10.9.1 to v11.6.0

Deployment:
- Exclude desktop-app/ from Docker build context via .dockerignore
- Guard CI/CD registry push to prevent publishing on pull_request events
Copilot AI review requested due to automatic review settings May 24, 2026 18:05
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment May 24, 2026 6:05pm

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies a set of small fixes found during an audit, spanning UI polish, accessibility attributes on dialogs, a find/replace correctness fix, Mermaid export consistency, and CI/Docker hardening.

Changes:

  • CSS: prevent active-tab “1px jump” and smooth the mobile menu overlay fade.
  • HTML/JS: add aria-hidden defaults to dialogs; fix literal replacement behavior in “Replace all”; align Mermaid CDN version in exported HTML.
  • Ops: exclude desktop-app/ from Docker build context and avoid pushing images on pull_request events.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
styles.css Reserves tab border space to avoid layout jump; replaces overlay display-toggling with opacity/visibility transitions.
index.html Adds aria-hidden="true" to several dialog wrappers so hidden dialogs aren’t announced by screen readers.
script.js Makes replace-all treat user replacement text literally; updates Mermaid version in the HTML export template.
.github/workflows/docker-publish.yml Prevents GHCR pushes on PR events to reduce CI failures on forks.
.dockerignore Excludes desktop-app/ from the web Docker image context to reduce bloat and leakage of dev artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread styles.css
Comment on lines 959 to 970
@@ -966,14 +965,15 @@ a:focus {
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.3s ease, visibility 0.3s ease;
z-index: 1000;
Comment thread styles.css
Comment on lines 1667 to 1671
max-width: 180px;
background-color: var(--button-bg);
border: 1px solid var(--border-color);
border-bottom: none;
border-bottom: 1px solid transparent;
border-radius: 6px 6px 0 0;
Comment thread script.js
Comment on lines 3769 to 3774
if (!query) return;
const replacement = findReplaceWith ? findReplaceWith.value : '';
const regex = new RegExp(escapeRegExp(query), 'gi');
markdownEditor.value = markdownEditor.value.replace(regex, replacement);
markdownEditor.value = markdownEditor.value.replace(regex, () => replacement);
markdownEditor.dispatchEvent(new Event('input', { bubbles: true }));
refreshFindMatches({ resetIndex: true });
Comment thread script.js
Comment on lines 4330 to 4334
};
</script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.9.1/dist/mermaid.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js"></script>
<style>
Comment thread index.html
Comment on lines 541 to 545
<!-- Link Modal -->
<div id="link-modal" class="reset-modal-overlay" role="dialog" aria-modal="true" aria-labelledby="link-modal-title" style="display:none;">
<div id="link-modal" class="reset-modal-overlay" role="dialog" aria-modal="true" aria-labelledby="link-modal-title" aria-hidden="true" style="display:none;">
<div class="reset-modal-box reset-modal-box--wide">
<p id="link-modal-title" class="reset-modal-message">Insert link</p>
<div class="reset-modal-field">
Comment thread index.html

<!-- Mermaid Zoom Modal -->
<div id="mermaid-zoom-modal" role="dialog" aria-modal="true" aria-label="Diagram zoom view">
<div id="mermaid-zoom-modal" role="dialog" aria-modal="true" aria-label="Diagram zoom view" aria-hidden="true">
Comment thread index.html
Comment on lines 314 to 317
<!-- Reset Confirmation Modal -->
<div id="reset-confirm-modal" class="reset-modal-overlay" role="dialog" aria-modal="true" aria-labelledby="reset-modal-title" style="display:none;">
<div id="reset-confirm-modal" class="reset-modal-overlay" role="dialog" aria-modal="true" aria-labelledby="reset-modal-title" aria-hidden="true" style="display:none;">
<div class="reset-modal-box reset-modal-box--wide">
<p id="reset-modal-title" class="reset-modal-message">Are you sure you want to delete all files?</p>
@ThisIs-Developer ThisIs-Developer merged commit 2bb281a into main May 24, 2026
7 checks passed
@ThisIs-Developer ThisIs-Developer deleted the fix/audit-visual-a11y-deploy-fixes branch May 24, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants