ui-kit icon indicating copy to clipboard operation
ui-kit copied to clipboard

Collapsible Panel assigns button role to the whole header

Open dogayuksel opened this issue 3 years ago • 4 comments

Describe the bug Collapsible Panel Component assigns button role to the whole header. This creates an ambiguity when there are other interactive elements inside the header.

Expected behavior Header as a whole should be interactive when there are no elements inside, or the button role should be assigned to the rotating caret icon only.

Screenshots Screenshot 2022-09-16 at 14 37 40

dogayuksel avatar Sep 16 '22 13:09 dogayuksel

Thanks for reporting this. It might be a regression introduced here #2262

@ddouglasz Can you check? Thanks

emmenko avatar Sep 16 '22 13:09 emmenko

The <HeaderContainer> is an <AccessibleButton>. Not sure why to be honest. Maybe we need to refactor it to not use the <AccessibleButton> but only keep the accessibility features? 🤔

https://github.com/commercetools/ui-kit/blob/aa185a1f6bf069e6e7c4f6eab8453843670eef50/packages/components/collapsible-panel/src/collapsible-panel.tsx#L197-L210

emmenko avatar Sep 16 '22 13:09 emmenko

...or can it somehow have another label at least?

tdeekens avatar Sep 16 '22 13:09 tdeekens

Thanks for reporting this. It might be a regression introduced here #2262

@ddouglasz Can you check? Thanks Looking into it

ddouglasz avatar Sep 16 '22 15:09 ddouglasz