Closed bennymeier closed 11 months ago
I'll take a look. To be clear, you use data-action
attribute as an identifier to know where to apply specific strings, correct?
I use data-action
as an identifier to apply my own language constants, e.g.
const selectBtn = this.toolbar.querySelector("div[data-action='select']") as HTMLDivElement;
if (selectBtn) {
selectBtn.ariaLabel = this.i18n.IMAGE_EDITOR_TOOLBAR_SELECT_BTN;
selectBtn.title = this.i18n.IMAGE_EDITOR_TOOLBAR_SELECT_BTN;
}
const deleteBtn = this.toolbar.querySelector("div[data-action='delete']") as HTMLDivElement;
if (deleteBtn) {
deleteBtn.ariaLabel = this.i18n.IMAGE_EDITOR_TOOLBAR_DELETE_BTN;
deleteBtn.title = this.i18n.IMAGE_EDITOR_TOOLBAR_DELETE_BTN;
}
I can't use class
oder title
to identify the element, it looks false if you know what I mean.
Hi,
I overwrite the
title
- and thearia-label
-attributes after initializing Marker.js. So it looks like this:The code above shows the top toolbar there it works just fine because I have all the attributes. But the buttons at the bottom toolbar unfortunately have no
aria-label
- and nodata-action
-attributes why it's difficult for me to access them. Could you add that? Then it would also be consistent with the upper toolbar. I am also creating a similar task for Cropro.Thank you very much!