designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

feat(Accordion): use native <details> element

Open eirikbacker opened this issue 6 months ago • 3 comments

  • Fixes #2100 🥳
  • Deprecates #2176
  • Built on top of <u-details> for better accessibility on mobile
  • Removes level from AccordionHeader as this is not supported by native <details>
  • Removes onHeaderClick from AccordionHeader as this is identical to adding a onClick handler
  • JS-based animation can be removed and replaced by CSS when calc-size(auto) is fully supported 🚀

Question: It is now implemented so search-in-page only works when using defaultOpen, as a controlled open should not be affected by user interaction. Just checking - does this make sense to you guys as well? :)

eirikbacker avatar Jul 29 '24 13:07 eirikbacker