Skip to content
Open
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 @@
## 2025-05-18 - Dynamic UI State Context Loss
**Learning:** Dynamic DOM section swaps (like hiding a progress bar and showing a completion section) cause loss of context and leave keyboard/screen reader users stranded without an anchor point.
**Action:** When dynamically swapping major UI sections, explicitly move focus to a newly revealed heading by adding `tabindex="-1"` and calling `.focus()`. Furthermore, use native ARIA roles (e.g. `role="progressbar"`) and `aria-live="polite"` to ensure progress transitions are accessible.

## 2026-08-24 - Fieldsets for Radio Button Groups
**Learning:** Generic `div` elements and orphaned `label` tags used to group radio buttons fail to provide structural context to screen readers, meaning users hear options without knowing what they belong to.
**Action:** When creating radio button groups, always use a `<fieldset>` to group them and a `<legend>` to describe the group. Use inline styles like `border: none; padding: 0; margin: 0;` to maintain visual consistency without adding borders.
6 changes: 3 additions & 3 deletions web_app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ <h2>Processing Options</h2>
</select>

<!-- Background Removal Mode -->
<div style="margin-top: 1rem;">
<label>Background Removal Method</label>
<fieldset style="border: none; padding: 0; margin: 0; margin-top: 1rem;">
<legend style="padding: 0; font-weight: 600; margin-bottom: 0.5rem; color: var(--text);">Background Removal Method</legend>
<div style="margin-top: 0.5rem;">
<label style="display: block; margin-bottom: 0.5rem;">
<input type="radio" name="bg-method" value="rvm" checked>
Expand All @@ -133,7 +133,7 @@ <h2>Processing Options</h2>
Person Segmentation (better for occlusions)
</label>
</div>
</div>
</fieldset>

<!-- Morphological Cleanup (RVM only) -->
<div id="morph-cleanup-section" style="margin-top: 1rem;">
Expand Down