files-ui-react icon indicating copy to clipboard operation
files-ui-react copied to clipboard

Add `title` and `aria-*` options to ActionButtonItem

Open TimmFitschen opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, actionButtons are not following modern best practices for a11y (accessibility), especially WAI-ARIA out of the box and do not allow to specify the title or aria attributes manually.

Describe the solution you'd like

Add title the option explicitly and allow aria-* attributes to be passed on to the button element.

<Dropzone 
  actionButtons={{
    uploadButton: {
      ariaLabel: "Click here to upload the selected files."
      title="Click here to upload the selected files."
    }
  }}/> 

Describe alternatives you've considered

Providing good defaults first and add the customization later - however, this is much more effort and defaults should be chosen carefully. So I think customization first and defaults later is better in this case.

TimmFitschen avatar Sep 05 '23 13:09 TimmFitschen

I could provide an implementation if you want, @JinSSJ3 .

TimmFitschen avatar Sep 05 '23 13:09 TimmFitschen