@@ -56,45 +56,45 @@ Hover over the buttons below to see the four tooltips directions: top, right, bo
56
56
57
57
::: demo
58
58
<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 >
61
61
</template >
62
62
</CTooltip >
63
63
<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 >
66
66
</template >
67
67
</CTooltip >
68
68
<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 >
71
71
</template >
72
72
</CTooltip >
73
73
<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 >
76
76
</template >
77
77
</CTooltip >
78
78
:::
79
79
``` vue
80
80
<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>
83
83
</template>
84
84
</CTooltip>
85
85
<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>
88
88
</template>
89
89
</CTooltip>
90
90
<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>
93
93
</template>
94
94
</CTooltip>
95
95
<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>
98
98
</template>
99
99
</CTooltip>
100
100
```
@@ -124,8 +124,8 @@ You can customize the appearance of tooltips using [CSS variables](#css-variable
124
124
placement="top"
125
125
: style ="customTooltipStyle"
126
126
>
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 >
129
129
</template>
130
130
</CTooltip>
131
131
:::
@@ -136,8 +136,8 @@ You can customize the appearance of tooltips using [CSS variables](#css-variable
136
136
placement="top"
137
137
:style="customTooltipStyle"
138
138
>
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>
141
141
</template>
142
142
</CTooltip>
143
143
</template>
@@ -162,17 +162,17 @@ Elements with the disabled attribute aren’t interactive, meaning users cannot
162
162
163
163
::: demo
164
164
<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 " >
167
167
<CButton color =" primary " disabled >Disabled button</CButton >
168
168
</span >
169
169
</template >
170
170
</CTooltip >
171
171
:::
172
172
``` vue
173
173
<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">
176
176
<CButton color="primary" disabled>Disabled button</CButton>
177
177
</span>
178
178
</template>
0 commit comments