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

Expander with checkbox variant changes both text and label #748

Open
danielck opened this issue Jun 16, 2023 · 1 comment
Open

Expander with checkbox variant changes both text and label #748

danielck opened this issue Jun 16, 2023 · 1 comment

Comments

@danielck
Copy link
Contributor

Expected Behavior

When the expanded state of a button changes, the label should not change, because this confuses screen reader users and makes determining the actual functionality hard.

Actual Behavior

The example code for the Expander with checkbox variant has separate text for the unopened and opened states, but also sets the programmatic state using aria-expanded.

Proposed solution

The issue can be worked around by using the same text for both unopened and opened states, but since the component already has a programmatic state, it should probably not have the option at all for more than one label.

Consider setting the label automatically based on the checkbox label.

@jenkrisu
Copy link
Collaborator

jenkrisu commented Aug 9, 2023

Created a ticket about this issue. 👍

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

2 participants