Commit 9873283
authored
fix(components): Divider accessibility defaults can't be overridden (#224)
## Summary
- `Divider.tsx` spread `{...rest}` after its `accessible={false}` /
`importantForAccessibility="no"` defaults, so a caller passing either
prop explicitly could override Divider's "hidden from assistive
technology" behavior.
- Reordered so the component's own defaults always win, since Divider is
purely decorative and no legitimate use case was found for making it
independently accessible/focusable — same reasoning as the `disabled`
merge fix in #221 for Button/IconButton/Input/TextArea.
- Added a regression test asserting
`accessible`/`importantForAccessibility` can't be overridden via props.
Fixes #219
## Test plan
- [x] `pnpm jest Divider` — 4/4 pass
- [x] `pnpm lint` — clean
- [x] `pnpm check-types` — clean
- [x] `pnpm prettier --check` — clean1 parent b2fa65c commit 9873283
2 files changed
Lines changed: 14 additions & 1 deletion
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
24 | 37 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments