dnd-kit
dnd-kit copied to clipboard
Should role="button" be present when using a handle?
When using a handle should the draggable item still have a role="button"
attribute?
Example: https://5fc05e08a4a65d0021ae0bf2-mdsmdaavqx.chromatic.com/?path=/story/presets-sortable-vertical--drag-handle
Thanks for the awesome library!
This can cause a problem when a global CSS applies on [role=button], with handle I think the role should be removed too.
This also can give an HTML error of type 'An element "input" must not appear as a descendant of an element with the attribute "role=button"', if you're planing on using an input element inside the draggable item.
Just ran into this as well when using on sortable table column headers. Disabled = true and role = button still being spread from {...attributes}
which is causing hover styling from our global [type=button]
styles. Who is appropriate person to tag on project to get this sorted (pun intended)?