Image: zoomImage aria-label added
parent
7469bc2308
commit
fd6799bbe0
|
@ -3,7 +3,7 @@
|
||||||
<slot name="image" :onError="onError" :errorCallback="onError">
|
<slot name="image" :onError="onError" :errorCallback="onError">
|
||||||
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
|
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
|
||||||
</slot>
|
</slot>
|
||||||
<button v-if="preview" ref="previewButton" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
<button v-if="preview" ref="previewButton" :aria-label="zoomImageAriaLabel" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
||||||
<slot name="indicatoricon">
|
<slot name="indicatoricon">
|
||||||
<component :is="indicatorIcon ? 'i' : 'EyeIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
|
<component :is="indicatorIcon ? 'i' : 'EyeIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -212,6 +212,9 @@ export default {
|
||||||
zoomOutAriaLabel() {
|
zoomOutAriaLabel() {
|
||||||
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomOut : undefined;
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomOut : undefined;
|
||||||
},
|
},
|
||||||
|
zoomImageAriaLabel() {
|
||||||
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.zoomImage : undefined;
|
||||||
|
},
|
||||||
closeAriaLabel() {
|
closeAriaLabel() {
|
||||||
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : undefined;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue