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
Expand Up @@ -56,3 +56,6 @@
## 2024-07-14 - Native Keyboard Submission with Forms for Modals
**Learning:** Modals designed with plain `<div>` elements as wrappers instead of `<form>` lack native keyboard submission support, forcing users to switch from keyboard to mouse to confirm actions like "Save".
**Action:** When designing modals or popups containing inputs, always use a `<form>` element to wrap the content, handle the `onSubmit` event (calling `e.preventDefault()`), and set the primary confirmation button to `type="submit"` to enable seamless Enter-key submission for keyboard users.
## 2026-08-06 - [Radiogroup ν•˜μœ„ μ—­ν•  및 ARIA μƒνƒœ]
**Learning:** `role="radiogroup"`을 μ‚¬μš©ν•˜μ—¬ μ»€μŠ€ν…€ 선택 μ˜μ—­(예: 색상 μŠ€μ™€μΉ˜)을 κ°μŒ€ λ•Œ, ν•˜μœ„ μš”μ†Œκ°€ `role="radio"`λ₯Ό κ°€μ§€κ³  `aria-pressed` λŒ€μ‹  `aria-checked` 속성을 μ‚¬μš©ν•˜λ„λ‘ ν•˜λŠ” 것이 μ€‘μš”ν•©λ‹ˆλ‹€. 슀크린 λ¦¬λ”λŠ” radiogroup의 μƒνƒœμ™€ 탐색 μ˜΅μ…˜μ„ μ˜¬λ°”λ₯΄κ²Œ μ•Œλ¦¬κΈ° μœ„ν•΄ λΆ€λͺ¨-μžμ‹ μ—­ν•  관계에 μ˜μ‘΄ν•©λ‹ˆλ‹€. ꡬ쑰가 μΌμΉ˜ν•˜μ§€ μ•ŠμœΌλ©΄ ν•­λͺ© μˆ˜μ™€ μƒνƒœκ°€ μ œλŒ€λ‘œ μ•Œλ €μ§€μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
**Action:** `role="radiogroup"`이 ν¬ν•¨λœ μ»€μŠ€ν…€ λΌλ””μ˜€ 그룹을 λ§Œλ“€ λ•Œ ν•˜μœ„ μƒν˜Έ μž‘μš© μš”μ†Œκ°€ `role="radio"`λ₯Ό κ°€μ§€κ³  `aria-pressed` λŒ€μ‹  `aria-checked`λ₯Ό μ‚¬μš©ν•˜μ—¬ μƒνƒœλ₯Ό ν‘œν˜„ν•˜λ„λ‘ 항상 μ μš©ν•˜μ„Έμš”. κ΄€λ ¨λœ DOM ν…ŒμŠ€νŠΈ μ„ νƒμžκ°€ 'radio' 역할을 μ‘°νšŒν•˜λ„λ‘ μ—…λ°μ΄νŠΈλ˜μ—ˆλŠ”μ§€ ν™•μΈν•˜μ„Έμš”.
3 changes: 2 additions & 1 deletion frontend/src/components/modals/GroupModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ export function GroupModal({
{BUSINESS_GROUP_COLORS.map((color) => (
<button
type="button"
role="radio"
aria-label={`색상 ${color}`}
aria-pressed={newGroupColor === color}
aria-checked={newGroupColor === color}
className="groupManager__swatch"
key={color}
onClick={() => setNewGroupColor(color)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/modals/ModalCoverage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ describe('modal behavior coverage', () => {
/>,
)
fireEvent.change(screen.getByLabelText('κ·Έλ£Ή 이름'), { target: { value: 'New' } })
fireEvent.click(screen.getAllByRole('button', { name: /^색상 / })[1]!)
fireEvent.click(screen.getAllByRole('radio', { name: /^색상 / })[1]!)
fireEvent.click(screen.getByRole('button', { name: 'μΆ”κ°€' }))
vi.spyOn(window, 'confirm').mockReturnValueOnce(true)
fireEvent.click(screen.getByRole('button', { name: 'Billing κ·Έλ£Ή μ‚­μ œ' }))
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ button:disabled {
box-shadow: 0 0 0 1px var(--color-border);
}

.groupManager__swatch[aria-pressed="true"] {
.groupManager__swatch[aria-checked="true"] {
box-shadow: 0 0 0 3px var(--color-text-strong);
}

Expand Down
Loading