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

@mantine/core/Switch is missing data-checked attribute. #7228

Closed
1 of 2 tasks
zstarvit opened this issue Dec 6, 2024 · 1 comment
Closed
1 of 2 tasks

@mantine/core/Switch is missing data-checked attribute. #7228

zstarvit opened this issue Dec 6, 2024 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@zstarvit
Copy link

zstarvit commented Dec 6, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

^7.11.2

What package has an issue?

@mantine/core

What framework do you use?

Other, I will specify in the bug description

In which browsers you can reproduce the issue?

All

Describe the bug

Note: This bug can be observed on the mantine documentation website as well

https://mantine.dev/core/switch

Checkbox and Radio elements have a data-checked attribute that is filled with the checked state of the element. For some reason Switch is missing this data attribute, and in fact none of the attributes on the DOM element change at all when the switch is checked or unchecked. This makes it impossible to inspect these elements with automation software out of the box, which seems unintended.

The .value is always 'on', while the checked property of the node changes between true and false - but the attribute on the element always stays as just checked.

If possible, include a link to a codesandbox with a minimal reproduction

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Dec 12, 2024
@rtivital
Copy link
Member

Fixed in 7.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants