For accordions with the exclusive setting set to true, 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 to true/false, as well as setting the inert 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 🙂
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)