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.

## 2025-02-12 - Radio Button Groups Semantics
**Learning:** Radio buttons grouped within generic `<div>` wrappers often lack structural context, causing screen readers to announce the options without their associated group question or label.
**Action:** Always replace generic `<div>` wrappers around radio button groups with semantic `<fieldset>` tags, and replace the group's label with a `<legend>`. Use inline reset styles (`border: none; padding: 0; margin: 0;`) to prevent the browser's default fieldset rendering from breaking the visual design system.
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: 1rem 0 0 0;">
<legend style="font-weight: 600; margin-bottom: 0.5rem; color: var(--text); padding: 0;">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