Commit graph

13 commits

Author SHA1 Message Date
Eric Liu
632320ae3b
fix(combo-box): "Escape" key clears input value (#2169)
Fixes #2167
2025-06-07 12:45:32 -07:00
Eric Liu
95c06a83b3
fix(combo-box): clear button supports "Space" key (#2168)
Fixes #2166
2025-06-07 12:33:59 -07:00
Eric Liu
bfe86be11b test(combo-box): more unit tests 2025-05-20 09:04:58 -07:00
Eric Liu
50b4761791 test(combo-box): add keyboard navigation test 2025-05-20 08:59:14 -07:00
Nick Wing
436dea47e8
feat(combo-box): add hideLabel prop (#2153) 2025-04-18 10:27:14 -07:00
Eric Liu
1a5f2d8e67
fix(list-box): correct button/description translations based on selection count (#2139)
The `ListBoxSelection` component now properly handles
translations for the clear button based on the selected items:

- Fix `buttonLabel` and `description` to use the same translation logic
- Add tests for custom translations in both `ComboBox` and `MultiSelect`
2025-03-23 11:28:06 -07:00
Eric Liu
9b61af0306
fix(list-box): set aria-disabled if disabled (#2125) (#2138)
Re-apply #2125 (reverted in #2130) to preserve `disabled` attribute.

Carbon styles depend on the `[disabled]` attribute. However, the `disabled`
attribute is not valid markup when applied to `div role="option"`. This PR
preserves the existing `disabled` attribute while also setting `aria-disabled`
to maintain accessibility.
2025-03-23 10:46:25 -07:00
Eric Liu
dd1338ffc4
fix(list-box-selection): fix aria-label for clear button (#2134)
`ListBoxSelection`, used by `MultiSelect` and `ComboBox`, currently  
applies the wrong `aria-label` for the clear selection button. It uses
the `translateId` (e.g., `"clearAll"`) instead of the user-friendly copy.
2025-03-22 12:59:16 -07:00
Eric Liu
199bb0eb8e
Revert "fix(list-box): use aria-disabled instead of invalid disabled attribute" (#2130)
This reverts commit e1b3ef22c9.
2025-03-19 13:05:28 -07:00
Eric Liu
e1b3ef22c9
fix(list-box): use aria-disabled instead of invalid disabled attribute (#2125) 2025-03-19 12:43:05 -07:00
Eric Liu
c67e095eaf test(combo-box): more unit tests 2025-03-19 10:42:54 -07:00
Brian West
9e3d83031e
fix(combo-box): fix typing when refocusing input
Fixes a bug where the input `value` is immediately reset
when re-focusing the input. The `value` resetting is necessary
to support programmatically clearing the value, but it should
only execute if the input is not currently focused.
2025-03-19 10:29:13 -07:00
Eric Liu
0e1177f398 test(combo-box): add unit tests 2025-03-17 21:19:24 -07:00