File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
packages/bootstrap-vue-3/src/components Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 15
15
ref =" element"
16
16
class =" modal"
17
17
:class =" modalClasses"
18
+ role =" dialog"
19
+ :aria-labelledby =" `${computedId}-label`"
20
+ :aria-describedby =" `${computedId}-body`"
18
21
:style =" {display: 'block'}"
19
22
tabindex =" -1"
20
23
v-bind =" $attrs"
24
27
<div class =" modal-content" :class =" contentClass" >
25
28
<div v-if =" !hideHeaderBoolean" class =" modal-header" :class =" headerClasses" >
26
29
<slot name =" header" >
27
- <component :is =" titleTag" class =" modal-title" :class =" titleClasses" >
30
+ <component
31
+ :is =" titleTag"
32
+ :id =" `${computedId}-label`"
33
+ class =" modal-title"
34
+ :class =" titleClasses"
35
+ >
28
36
<slot name =" title" >
29
37
{{ title }}
30
38
</slot >
48
56
</template >
49
57
</slot >
50
58
</div >
51
- <div class =" modal-body" :class =" bodyClasses" >
59
+ <div :id = " `${computedId}-body` " class =" modal-body" :class =" bodyClasses" >
52
60
<slot />
53
61
</div >
54
62
<div v-if =" !hideFooterBoolean" class =" modal-footer" :class =" footerClasses" >
@@ -101,6 +109,12 @@ import BCloseButton from './BButton/BCloseButton.vue'
101
109
import BTransition from ' ./BTransition/BTransition.vue'
102
110
103
111
// TODO build lazy system
112
+ // aria
113
+ // autofocus
114
+ // close on escape when autofocus
115
+
116
+ // Note, attempt to return focus to item that openned the modal after close
117
+ // Implement auto focus props like autoFocusButton
104
118
105
119
interface BModalProps {
106
120
bodyBgVariant? : ColorVariant
You can’t perform that action at this time.
0 commit comments