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
No aria-expanded attribute on Spoiler component #3183
Comments
Also concerned about this issue https://codesandbox.io/s/jolly-robinson-3sebvw The one issue - is unable to set aria attributes to @rtivital What do you think to add this internally? |
https://www.npmjs.com/package/@gaearon/react-collapsed |
…make it receive focus before the content (#3183)
…ibutes to show/hide control (#3183)
The issue is resolved in 7.0.1 |
What package has an issue
@mantine/core
Describe the bug
Spoiler component has no deterministic way of semantically describing the state of the component. Specifically, whether or not the spoiler is expanded. This makes it hard to apply custom styles for the two states. Other components, like the menu component, provide
aria-expanded
anddata-expanded
attributes that change based on whether the component is open or closed.The only way I know to ensure the parent element holds the state is to attach my own classes to the parent -- which you can do by inspecting the button text (provided by
showLabel
andhideLabel
props). However, since the buttons are always rendered sometime after the spoiler component, you must hack a way to check for the existence of the button first, then check the text, then apply my parent class.What version of @mantine/hooks page do you have in package.json?
5.9.4
If possible, please include a link to a codesandbox with the reproduced problem
No response
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
Yes
Possible fix
No response
The text was updated successfully, but these errors were encountered: