@@ -11,15 +11,15 @@ other_frameworks: popover
11
11
12
12
::: demo
13
13
<CPopover title =" Popover title " content =" And here\’s some amazing content. It’s very engaging. Right? " placement =" right " >
14
- <template #toggler="{ on }">
15
- <CButton color =" danger " size =" lg " v-on =" on " >Click to toggle popover</CButton >
14
+ <template #toggler="{ id, on }">
15
+ <CButton color =" danger " size =" lg " :aria-describedby = " id " v-on =" on " >Click to toggle popover</CButton >
16
16
</template >
17
17
</CPopover >
18
18
:::
19
19
``` vue
20
20
<CPopover title="Popover title" content="And here\’s some amazing content. It’s very engaging. Right?" placement="right">
21
- <template #toggler="{ on }">
22
- <CButton color="danger" size="lg" v-on="on">Click to toggle popover</CButton>
21
+ <template #toggler="{ id, on }">
22
+ <CButton color="danger" size="lg" :aria-describedby="id" v-on="on">Click to toggle popover</CButton>
23
23
</template>
24
24
</CPopover>
25
25
```
@@ -41,45 +41,45 @@ Four options are available: top, right, bottom, and left aligned. Directions are
41
41
42
42
::: demo
43
43
<CPopover content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" top " >
44
- <template #toggler="{ on }">
45
- <CButton color =" secondary " v-on =" on " >Popover on top</CButton >
44
+ <template #toggler="{ id, on }">
45
+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Popover on top</CButton >
46
46
</template >
47
47
</CPopover >
48
48
<CPopover content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" right " >
49
- <template #toggler="{ on }">
50
- <CButton color =" secondary " v-on =" on " >Popover on right</CButton >
49
+ <template #toggler="{ id, on }">
50
+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Popover on right</CButton >
51
51
</template >
52
52
</CPopover >
53
53
<CPopover content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" bottom " >
54
- <template #toggler="{ on }">
55
- <CButton color =" secondary " v-on =" on " >Popover on bottom</CButton >
54
+ <template #toggler="{ id, on }">
55
+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Popover on bottom</CButton >
56
56
</template >
57
57
</CPopover >
58
58
<CPopover content =" Vivamus sagittis lacus vel augue laoreet rutrum faucibus " placement =" left " >
59
- <template #toggler="{ on }">
60
- <CButton color =" secondary " v-on =" on " >Popover on left</CButton >
59
+ <template #toggler="{ id, on }">
60
+ <CButton color =" secondary " :aria-describedby = " id " v-on =" on " >Popover on left</CButton >
61
61
</template >
62
62
</CPopover >
63
63
:::
64
64
``` vue
65
65
<CPopover content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="top">
66
- <template #toggler="{ on }">
67
- <CButton color="secondary" v-on="on">Popover on top</CButton>
66
+ <template #toggler="{ id, on }">
67
+ <CButton color="secondary" :aria-describedby="id" v-on="on">Popover on top</CButton>
68
68
</template>
69
69
</CPopover>
70
70
<CPopover content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="right">
71
- <template #toggler="{ on }">
72
- <CButton color="secondary" v-on="on">Popover on right</CButton>
71
+ <template #toggler="{ id, on }">
72
+ <CButton color="secondary" :aria-describedby="id" v-on="on">Popover on right</CButton>
73
73
</template>
74
74
</CPopover>
75
75
<CPopover content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="bottom">
76
- <template #toggler="{ on }">
77
- <CButton color="secondary" v-on="on">Popover on bottom</CButton>
76
+ <template #toggler="{ id, on }">
77
+ <CButton color="secondary" :aria-describedby="id" v-on="on">Popover on bottom</CButton>
78
78
</template>
79
79
</CPopover>
80
80
<CPopover content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus" placement="left">
81
- <template #toggler="{ on }">
82
- <CButton color="secondary" v-on="on">Popover on left</CButton>
81
+ <template #toggler="{ id, on }">
82
+ <CButton color="secondary" :aria-describedby="id" v-on="on">Popover on left</CButton>
83
83
</template>
84
84
</CPopover>
85
85
```
@@ -110,8 +110,8 @@ You can customize the appearance of popovers using [CSS variables](#css-variable
110
110
title="Custom popover"
111
111
: style ="customPopoverStyle"
112
112
>
113
- <template #toggler="{ on }">
114
- <CButton color="secondary" v-on="on"> Custom popover</CButton >
113
+ <template #toggler="{ id, on }">
114
+ <CButton color="secondary" :aria-describedby="id" v-on="on"> Custom popover</CButton >
115
115
</template>
116
116
</CPopover>
117
117
:::
@@ -123,8 +123,8 @@ You can customize the appearance of popovers using [CSS variables](#css-variable
123
123
title="Custom popover"
124
124
:style="customPopoverStyle"
125
125
>
126
- <template #toggler="{ on }">
127
- <CButton color="secondary" v-on="on">Custom popover</CButton>
126
+ <template #toggler="{ id, on }">
127
+ <CButton color="secondary" :aria-describedby="id" v-on="on">Custom popover</CButton>
128
128
</template>
129
129
</CPopover>
130
130
</template>
@@ -160,8 +160,8 @@ For disabled popover triggers, you may also prefer `:trigger="['hover', 'focus']
160
160
placement="right"
161
161
: trigger ="[ 'hover', 'focus'] "
162
162
>
163
- <template #toggler="{ on }">
164
- <span class="d-inline-block" :tabindex="0" v-on="on">
163
+ <template #toggler="{ id, on }">
164
+ <span class="d-inline-block" :tabindex="0" :aria-describedby="id" v-on="on">
165
165
<CButton color="primary" disabled> Disabled button</CButton >
166
166
</span>
167
167
</template>
@@ -173,8 +173,8 @@ For disabled popover triggers, you may also prefer `:trigger="['hover', 'focus']
173
173
placement="right"
174
174
:trigger="['hover', 'focus']"
175
175
>
176
- <template #toggler="{ on }">
177
- <span class="d-inline-block" :tabindex="0" v-on="on">
176
+ <template #toggler="{ id, on }">
177
+ <span class="d-inline-block" :tabindex="0" :aria-describedby="id" v-on="on">
178
178
<CButton color="primary" disabled>Disabled button</CButton>
179
179
</span>
180
180
</template>
0 commit comments