Skip to content
Closed
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 @@ -54,3 +54,7 @@
## 2024-07-13 - [Table Node Accessibility]
**Learning:** Adding `aria-hidden="true"` inside `abbr` elements with `aria-label` prevents screen readers from redundantly announcing short abbreviations like "PK" or "NN" along with their full label.
**Action:** When creating short, domain-specific abbreviations with tooltips, use `aria-label` on the wrapper and hide the visual text from screen readers using `aria-hidden="true"` to create a cleaner auditory experience.

## 2024-07-18 - Tooltip interaction on functionally disabled buttons
**Learning:** Native `disabled` attributes on `<button>` elements prevent all interaction events, including mouse enter events that trigger native browser tooltips (`title`). When a user needs to know *why* a button is disabled, standard `disabled` prevents them from finding out.
**Action:** When providing a `title` explaining a disabled state, replace the native `disabled` attribute with `aria-disabled={true}`. Intercept the `onClick` handler (e.g. `e.preventDefault()`) and apply visual disabled styling manually to preserve accessibility and discoverability.
10 changes: 8 additions & 2 deletions frontend/src/components/modals/AddTableModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,17 @@ export function AddTableModal({
<button type="button" onClick={onAddTableCancel}>์ทจ์†Œ</button>
<button
type="submit"
disabled={!newTableName.trim()}
aria-disabled={!newTableName.trim()}
onClick={(e) => {
if (!newTableName.trim()) {
e.preventDefault();
}
}}
title={!newTableName.trim() ? "ํ…Œ์ด๋ธ” ์ด๋ฆ„์„ ์ž…๋ ฅํ•ด์•ผ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค." : undefined}
style={
newTableName.trim()
? { background: "#034ea2", color: "#fff" }
: undefined
: { opacity: 0.5, cursor: "not-allowed" }
}
>
์ €์žฅ
Expand Down
Loading