[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
Which package are you modifying?
[x] accordion
[ ] alert
[ ] alert-dialog
[ ] aspect-ratio
[ ] avatar
[ ] badge
[ ] button
[ ] calendar
[ ] card
[ ] checkbox
[ ] collapsible
[ ] combobox
[ ] command
[ ] context-menu
[ ] data-table
[ ] date-picker
[ ] dialog
[ ] dropdown-menu
[ ] hover-card
[ ] input
[ ] label
[ ] menubar
[ ] navigation-menu
[ ] popover
[ ] progress
[ ] radio-group
[ ] scroll-area
[ ] select
[ ] separator
[ ] sheet
[ ] skeleton
[ ] slider
[ ] switch
[ ] table
[ ] tabs
[ ] textarea
[ ] toast
[ ] toggle
[ ] tooltip
[ ] typography
What is the current behavior?
When 2 accordions are on the app, the arrowkeys of the focusmanager stops working. This can be seen on spartan.ng.
When switching from Documentation to Accordion the accordion ArrowDown does not work.
This ist because the id is used to set the activeElement-index of the Focusmanager, which is not correct.
Closes #
What is the new behavior?
The ArrowDown now selects the next Trigger. The Focusmanager is set by the Item instead of the Item.id.
Instead of document.activeElement we now use the FocusMonitor to determine if the accordion is focused.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
When 2 accordions are on the app, the arrowkeys of the focusmanager stops working. This can be seen on spartan.ng. When switching from
Documentation
toAccordion
the accordion ArrowDown does not work. This ist because the id is used to set the activeElement-index of the Focusmanager, which is not correct.Closes #
What is the new behavior?
The
ArrowDown
now selects the next Trigger. The Focusmanager is set by the Item instead of the Item.id. Instead of document.activeElement we now use the FocusMonitor to determine if the accordion is focused.Does this PR introduce a breaking change?
Other information