@@ -56,45 +56,45 @@ Hover over the buttons below to see the four tooltips directions: top, right, bo
5656
5757::: demo
5858<CTooltip content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" top " >
59- <template #toggler="{ on }">
60- <CButton color =" secondary " v-on =" on " >Tooltip on top</CButton >
59+ <template #toggler="{ id, on }">
60+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Tooltip on top</CButton >
6161 </template >
6262</CTooltip >
6363<CTooltip content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" right " >
64- <template #toggler="{ on }">
65- <CButton color =" secondary " v-on =" on " >Tooltip on right</CButton >
64+ <template #toggler="{ id, on }">
65+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Tooltip on right</CButton >
6666 </template >
6767</CTooltip >
6868<CTooltip content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" bottom " >
69- <template #toggler="{ on }">
70- <CButton color =" secondary " v-on =" on " >Tooltip on bottom</CButton >
69+ <template #toggler="{ id, on }">
70+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Tooltip on bottom</CButton >
7171 </template >
7272</CTooltip >
7373<CTooltip content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" left " >
74- <template #toggler="{ on }">
75- <CButton color =" secondary " v-on =" on " >Tooltip on left</CButton >
74+ <template #toggler="{ id, on }">
75+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Tooltip on left</CButton >
7676 </template >
7777</CTooltip >
7878:::
7979``` vue
8080<CTooltip content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="top">
81- <template #toggler="{ on }">
82- <CButton color="secondary" v-on="on">Tooltip on top</CButton>
81+ <template #toggler="{ id, on }">
82+ <CButton color="secondary" :aria-describedby="id" v-on="on">Tooltip on top</CButton>
8383 </template>
8484</CTooltip>
8585<CTooltip content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="right">
86- <template #toggler="{ on }">
87- <CButton color="secondary" v-on="on">Tooltip on right</CButton>
86+ <template #toggler="{ id, on }">
87+ <CButton color="secondary" :aria-describedby="id" v-on="on">Tooltip on right</CButton>
8888 </template>
8989</CTooltip>
9090<CTooltip content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="bottom">
91- <template #toggler="{ on }">
92- <CButton color="secondary" v-on="on">Tooltip on bottom</CButton>
91+ <template #toggler="{ id, on }">
92+ <CButton color="secondary" :aria-describedby="id" v-on="on">Tooltip on bottom</CButton>
9393 </template>
9494</CTooltip>
9595<CTooltip content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="left">
96- <template #toggler="{ on }">
97- <CButton color="secondary" v-on="on">Tooltip on left</CButton>
96+ <template #toggler="{ id, on }">
97+ <CButton color="secondary" :aria-describedby="id" v-on="on">Tooltip on left</CButton>
9898 </template>
9999</CTooltip>
100100```
@@ -124,8 +124,8 @@ You can customize the appearance of tooltips using [CSS variables](#css-variable
124124 placement="top"
125125 : style ="customTooltipStyle"
126126>
127- <template #toggler="{ on }">
128- <CButton color="secondary" v-on="on"> Custom popover</CButton >
127+ <template #toggler="{ id, on }">
128+ <CButton color="secondary" :aria-describedby="id" v-on="on"> Custom popover</CButton >
129129 </template>
130130 </CTooltip>
131131 :::
@@ -136,8 +136,8 @@ You can customize the appearance of tooltips using [CSS variables](#css-variable
136136 placement="top"
137137 :style="customTooltipStyle"
138138 >
139- <template #toggler="{ on }">
140- <CButton color="secondary" v-on="on">Custom popover</CButton>
139+ <template #toggler="{ id, on }">
140+ <CButton color="secondary" :aria-describedby="id" v-on="on">Custom popover</CButton>
141141 </template>
142142 </CTooltip>
143143</template>
@@ -162,17 +162,17 @@ Elements with the disabled attribute aren’t interactive, meaning users cannot
162162
163163::: demo
164164<CTooltip content =" Disabled tooltip " >
165- <template #toggler="{ on }">
166- <span class =" d-inline-block " :tabindex =" 0 " v-on =" on " >
165+ <template #toggler="{ id, on }">
166+ <span class =" d-inline-block " :tabindex =" 0 " :aria-describedby = " id " v-on =" on " >
167167 <CButton color =" primary " disabled >Disabled button</CButton >
168168 </span >
169169 </template >
170170</CTooltip >
171171:::
172172``` vue
173173<CTooltip content="Disabled tooltip">
174- <template #toggler="{ on }">
175- <span class="d-inline-block" :tabindex="0" v-on="on">
174+ <template #toggler="{ id, on }">
175+ <span class="d-inline-block" :tabindex="0" :aria-describedby="id" v-on="on">
176176 <CButton color="primary" disabled>Disabled button</CButton>
177177 </span>
178178 </template>
0 commit comments