SwedbankPay/design.swedbankpay.com

Collapsible component needs to change state of the attribute `aria-expanded` between `true` and `false` based on component state

Closed this issue · 0 comments

As the title says, the component needs to have the attribute aria-expanded. Expanding and collapsing the component needs to update the boolean value of aria-expanded.
Ref: https://www.w3.org/WAI/GL/wiki/Using_aria-expanded_to_indicate_the_state_of_a_collapsible_element

The code example should also include the attribute aria-controls on the collapsible header element referencing the id of the collapsible body element.