ailon / cropro

Crop, rotate, flip, and straighten images in your web apps.
Other
13 stars 4 forks source link

Add aria-label and data-action attributes #18

Closed bennymeier closed 11 months ago

bennymeier commented 12 months ago

Hi,

I would like to add my own language to the title- and aria-label-attributes. The top and the bottom toolbar are missing the aria-label-attributes completly and in Marker.js you added also data-action-attributes where I can explicitly get the button which I want.

Currently:

<div title="Aspect ratio" class="__cropro__0_toolbar_button cropro__toolbar__button"></div>

Could be:

<div aria-label="Aspect ratio" title="Aspect ratio" data-action="ratio" class="__cropro__0_toolbar_button cropro__toolbar__button"></div>

Could you please add this too for Cropro? That would be very nice!

Thank you.

ailon commented 11 months ago

Added the attributes but since there were no button identifiers in CROPRO I didn't go through the process of adding a new property to each but rather used the default/English title for data-action. Theoretically slightly fragile, but in reality, unlikely to change.