Skip to content

Commit 3e9eadf

Browse files
committed
chore(BModal): add todo notes about next steps
1 parent 41d752a commit 3e9eadf

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

packages/bootstrap-vue-3/src/components/BModal.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
ref="element"
1616
class="modal"
1717
:class="modalClasses"
18+
role="dialog"
19+
:aria-labelledby="`${computedId}-label`"
20+
:aria-describedby="`${computedId}-body`"
1821
:style="{display: 'block'}"
1922
tabindex="-1"
2023
v-bind="$attrs"
@@ -24,7 +27,12 @@
2427
<div class="modal-content" :class="contentClass">
2528
<div v-if="!hideHeaderBoolean" class="modal-header" :class="headerClasses">
2629
<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+
>
2836
<slot name="title">
2937
{{ title }}
3038
</slot>
@@ -48,7 +56,7 @@
4856
</template>
4957
</slot>
5058
</div>
51-
<div class="modal-body" :class="bodyClasses">
59+
<div :id="`${computedId}-body`" class="modal-body" :class="bodyClasses">
5260
<slot />
5361
</div>
5462
<div v-if="!hideFooterBoolean" class="modal-footer" :class="footerClasses">
@@ -101,6 +109,12 @@ import BCloseButton from './BButton/BCloseButton.vue'
101109
import BTransition from './BTransition/BTransition.vue'
102110
103111
// 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
104118
105119
interface BModalProps {
106120
bodyBgVariant?: ColorVariant

0 commit comments

Comments
 (0)