File tree 2 files changed +11
-2
lines changed 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export default {
62
62
class : this . menuClasses ,
63
63
attrs : {
64
64
role : this . role ,
65
- 'aria-labelledby' : this . safeId ( this . split ? '_BV_toggle_ ' : '_BV_button_ ' )
65
+ 'aria-labelledby' : this . safeId ( this . split ? '_BV_button_ ' : '_BV_toggle_ ' )
66
66
} ,
67
67
on : {
68
68
mouseover : this . onMouseOver ,
Original file line number Diff line number Diff line change @@ -108,13 +108,22 @@ describe('dropdown', async () => {
108
108
expect ( Array . from ( dd_6 . $refs . menu . children ) . filter ( node => node . classList . contains ( 'dropdown-divider' ) ) . length ) . toBe ( 1 )
109
109
} )
110
110
111
- it ( '.dropdown menu aria-labelledby should target `_BV_button_ ` when not in split mode' , async ( ) => {
111
+ it ( '.dropdown menu aria-labelledby should target `_BV_toggle_ ` when not in split mode' , async ( ) => {
112
112
const { app : { $refs } } = window
113
113
const { dd_1 } = $refs // eslint-disable-line camelcase
114
114
115
115
const menu = Array . from ( dd_1 . $el . children )
116
116
. find ( node => node . attributes . role && node . attributes . role . value === 'menu' )
117
117
118
+ expect ( menu . attributes [ 'aria-labelledby' ] . value ) . toMatch ( / _ B V _ t o g g l e _ $ / )
119
+ } )
120
+ it ( '.dropdown menu aria-labelledby should target `_BV_button_` when in split mode' , async ( ) => {
121
+ const { app : { $refs } } = window
122
+ const { dd_2 } = $refs // eslint-disable-line camelcase
123
+
124
+ const menu = Array . from ( dd_2 . $el . children )
125
+ . find ( node => node . attributes . role && node . attributes . role . value === 'menu' )
126
+
118
127
expect ( menu . attributes [ 'aria-labelledby' ] . value ) . toMatch ( / _ B V _ b u t t o n _ $ / )
119
128
} )
120
129
} )
You can’t perform that action at this time.
0 commit comments