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

Toggle isn't flexible enough to support any kind of label design #494

Open
petemill opened this issue Nov 30, 2023 · 2 comments
Open

Toggle isn't flexible enough to support any kind of label design #494

petemill opened this issue Nov 30, 2023 · 2 comments

Comments

@petemill
Copy link
Member

petemill commented Nov 30, 2023

Affects accessibility as it forces consumer to put the "label" outside of the Toggle component, which result in the Toggle's button not having any descriptive content.

Example:
image

@petemill
Copy link
Member Author

Actually this might not be needed as we already have --leo-toggle-label-flex-direction and --leo-toggle-label-gap. Combined with width: 100%, I don't think we'd need much else. Perhaps we need to be able to customize justify-content.

@petemill
Copy link
Member Author

Another thought on the topic of Toggle's accessibility is that it combines a <label> and a <button>, but the labelling content is not put inside the button, even though that is the main actionable element. Wouldn't it be more appropriate to put the labelling content inside the <button> and maybe also not have a <label>?

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

1 participant