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

Cannot set the role attribute on the Dropzone component #5114

Closed
theSdev opened this issue Oct 24, 2023 · 1 comment
Closed

Cannot set the role attribute on the Dropzone component #5114

theSdev opened this issue Oct 24, 2023 · 1 comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@theSdev
Copy link

theSdev commented Oct 24, 2023

What package has an issue

@mantine/dropzone

Describe the bug

The Dropzone component produces <div role="presentation" tabindex="0"> for the root element, which as I've explained in this comment on react-dropzone's repo, is a bad idea accessibility-wise. I tried to overwrite it to role="button" on the Dropzone component, to no avail.

I think it'd be quite nice if Mantine shipped this component with role="button" by default, but in any case I think the role override should be possible.

What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)

7.1.3

If possible, please include a link to a codesandbox with the reproduced problem

https://codesandbox.io/s/flamboyant-glitter-pqqhrn

Do you know how to fix the issue

None

Are you willing to participate in fixing this issue and create a pull request with the fix

None

Possible fix

No response

rtivital added a commit that referenced this issue Nov 7, 2023
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Nov 7, 2023
@rtivital
Copy link
Member

rtivital commented Nov 7, 2023

Fixed in 7.2.1. You can now override any props by passing them to component – <Dropzone role="button" />

@rtivital rtivital closed this as completed Nov 7, 2023
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