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