[accordion] exclusive
accordions should call their callbacks for both the opening and the closing element
#2826
Labels
lang/javascript
Anything involving JavaScript
state/has-pr
An issue which has a related PR open
type/feat
Any feature requests or improvements
Milestone
Feature Request
For accordions with the
exclusive
setting set totrue
, when one element is already open and the user opens another element (so that the first one automatically closes), the callbacks in the settings section of the docs are only called for the element that is opened, and not the one that is closed (as of FUI v2.9.2).It would be useful to have the callbacks called for both affected elements, so that the developer does not have to iterate over the other elements to find which one was affected, in case they want to do something with it. (In my case - which motivated opening this issue - it's to set the
aria-expanded
attribute totrue
/false
, as well as setting theinert
attribute on closing accordion.content
to prevent keyboard focus while the closing animation is playing.)Example (if possible)
If the explanation above is not entirely clear, do post a comment, and I can create an example 🙂
Screenshot (if possible)
The text was updated successfully, but these errors were encountered: