Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsible Panel assigns button role to the whole header #2290

Open
dogayuksel opened this issue Sep 16, 2022 · 4 comments
Open

Collapsible Panel assigns button role to the whole header #2290

dogayuksel opened this issue Sep 16, 2022 · 4 comments
Assignees

Comments

@dogayuksel
Copy link
Contributor

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

@emmenko
Copy link
Member

emmenko commented Sep 16, 2022

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

@ddouglasz Can you check? Thanks

@emmenko
Copy link
Member

emmenko commented Sep 16, 2022

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? 🤔

<HeaderContainer
as="div"
css={[
getHeaderContainerStyles(props, isOpen),
getThemeStyle(props.theme),
]}
id={panelButtonId}
label=""
onClick={props.isDisabled ? undefined : toggle}
isDisabled={props.isDisabled}
buttonAttributes={dataProps}
aria-controls={panelContentId}
aria-expanded={isOpen ? 'true' : 'false'}
>

@tdeekens
Copy link
Contributor

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

@ddouglasz
Copy link
Contributor

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

@ddouglasz Can you check? Thanks
Looking into it

@ddouglasz ddouglasz self-assigned this Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants