Skip to content
Draft
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
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
## 2026-01-08 - Linking Descriptions with aria-describedby
**Learning:** Input fields often have helper text in `<span>` tags. These are invisible to screen readers unless programmatically linked.
**Action:** Always add `id` to the helper text span and `aria-describedby="[id]"` to the input field. This is a low-effort, high-impact accessibility win.

## 2026-01-17 - Communicating State with aria-pressed
**Learning:** Visual toggle buttons often rely on CSS classes (like `.btn-primary`) for state indication, leaving screen reader users unaware of the active mode.
**Action:** Use `aria-pressed="true/false"` on toggle buttons and update it via JavaScript alongside visual classes. This ensures state is programmatically communicated.
12 changes: 8 additions & 4 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ <h1>Intrusion Command Center</h1>
</div>
<div style="display: flex; gap: 10px;">
<button onclick="switchMode('manual')" id="btn-manual" class="btn btn-primary"
style="font-size: 0.8rem; padding: 10px 20px;">Manual Mode</button>
style="font-size: 0.8rem; padding: 10px 20px;" aria-pressed="true">Manual Mode</button>
<button onclick="switchMode('live')" id="btn-live" class="btn"
style="font-size: 0.8rem; padding: 10px 20px; border: 1px solid var(--glass-border);">Live Monitor</button>
style="font-size: 0.8rem; padding: 10px 20px; border: 1px solid var(--glass-border);" aria-pressed="false">Live Monitor</button>
</div>
</div>

Expand Down Expand Up @@ -223,8 +223,8 @@ <h3 style="font-size: 1rem; color: var(--text-muted); text-transform: uppercase;
<div class="form-grid">
<div class="form-group">
<label for="count">Connection Count (Same Host)</label>
<input type="number" name="count" id="count" min="0" placeholder="e.g. 5" required />
<span class="input-description">Number of connections to target host</span>
<input type="number" name="count" id="count" min="0" placeholder="e.g. 5" required aria-describedby="count-desc" />
<span class="input-description" id="count-desc">Number of connections to target host</span>
</div>

<div class="form-group">
Expand Down Expand Up @@ -339,13 +339,17 @@ <h2 style="margin-bottom: 20px;">📜 Analysis Vault</h2>
btnLive.classList.add('btn-primary');
btnManual.classList.remove('btn-primary');
btnManual.style.border = '1px solid var(--glass-border)';
btnLive.setAttribute('aria-pressed', 'true');
btnManual.setAttribute('aria-pressed', 'false');
startLiveMonitor();
} else {
manualPanel.style.display = 'block';
livePanel.style.display = 'none';
btnManual.classList.add('btn-primary');
btnLive.classList.remove('btn-primary');
btnLive.style.border = '1px solid var(--glass-border)';
btnManual.setAttribute('aria-pressed', 'true');
btnLive.setAttribute('aria-pressed', 'false');
stopLiveMonitor();
}
}
Expand Down