ScrollPanel 'aria-controls' attr added

pull/4878/head
tugcekucukoglu 2023-12-07 09:49:59 +03:00
parent 170f4c3dc5
commit d9372fdd73
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<template>
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="scrollpanel">
<div :class="cx('wrapper')" v-bind="ptm('wrapper')">
<div ref="content" :class="cx('content')" @scroll="onScroll" @mouseenter="moveBar" v-bind="ptm('content')">
<div ref="content" :id="contentId" :class="cx('content')" @scroll="onScroll" @mouseenter="moveBar" v-bind="ptm('content')">
<slot></slot>
</div>
</div>
@ -11,6 +11,7 @@
tabindex="0"
role="scrollbar"
aria-orientation="horizontal"
:aria-controls="contentId"
:aria-valuenow="lastScrollLeft"
@mousedown="onXBarMouseDown"
@keydown="onKeyDown($event)"
@ -26,6 +27,7 @@
tabindex="0"
role="scrollbar"
aria-orientation="vertical"
:aria-controls="contentId"
:aria-valuenow="lastScrollTop"
@mousedown="onYBarMouseDown"
@keydown="onKeyDown($event)"
@ -357,6 +359,11 @@ export default {
this.documentResizeListener = null;
}
}
},
computed: {
contentId() {
return UniqueComponentId() + '_content';
}
}
};
</script>