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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2024-07-03 - Custom Toggle Switches (role="switch") without aria-label
**Learning:** Found custom toggle switch components (buttons with `role="switch"`) in the `FraterniteesPortal` that do not provide `aria-label` or `aria-labelledby`, violating the memory directive regarding custom toggle switches lacking embedded visible text. This makes them inaccessible to screen readers as they won't know what setting the switch toggles.
**Action:** Always add an `aria-label` (e.g., `aria-label={\`Toggle ${label}\`}`) to toggle switches if they do not contain descriptive text inside the button.
2 changes: 2 additions & 0 deletions components/fraternitees/fraternitees-portal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ function PluginToggle({
type="button"
role="switch"
aria-checked={enabled}
aria-label={`Toggle ${label}`}
disabled={disabled}
onClick={onToggle}
className={classNames(
Expand Down Expand Up @@ -1038,6 +1039,7 @@ export function FraterniteesWorkspace({
type="button"
role="switch"
aria-checked={dailyAutoSync.enabled}
aria-label="Toggle Automatic daily sync"
onClick={() => void updateDailyAutoSync(!dailyAutoSync.enabled)}
className={classNames(
"relative h-7 w-12 shrink-0 rounded-full border transition",
Expand Down
Loading