Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 68a55f8

Browse files
committed
fix(BOffcanvas): remove deprecated property and aria-label for BButton.
1 parent ebeb6d1 commit 68a55f8

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

packages/bootstrap-vue-next/src/components/BOffcanvas/BOffcanvas.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</BButton>
4040
<BCloseButton
4141
v-else
42-
aria-label="headerCloseLabel"
42+
:aria-label="headerCloseLabel"
4343
v-bind="headerCloseAttrs"
4444
@click="hide('close')"
4545
/>
@@ -111,7 +111,6 @@ const props = withDefaults(
111111
headerClass?: string
112112
headerCloseClass?: ClassValue
113113
headerCloseLabel?: string
114-
headerCloseWhite?: Booleanish
115114
headerCloseVariant?: ButtonVariant | null
116115
bodyClass?: string
117116
footerClass?: string
@@ -137,7 +136,6 @@ const props = withDefaults(
137136
headerClass: undefined,
138137
headerCloseClass: undefined,
139138
headerCloseLabel: 'Close',
140-
headerCloseWhite: false,
141139
headerCloseVariant: 'secondary',
142140
bodyClass: undefined,
143141
footerClass: undefined,
@@ -234,7 +232,6 @@ const headerCloseClasses = computed(() => [
234232
])
235233
const headerCloseAttrs = computed(() => ({
236234
variant: hasHeaderCloseSlot.value ? props.headerCloseVariant : undefined,
237-
white: !hasHeaderCloseSlot.value ? props.headerCloseWhite : undefined,
238235
class: headerCloseClasses.value,
239236
}))
240237

packages/bootstrap-vue-next/src/components/BOffcanvas/offcanvas.spec.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,6 @@ describe.skip('offcanvas', () => {
188188
expect($closebutton.classes()).toContain('foobar')
189189
})
190190

191-
it('first child div child BCloseButton has class when prop headerCloseWhite', () => {
192-
const wrapper = mount(BOffcanvas, {
193-
props: {headerCloseWhite: true},
194-
})
195-
const [, $div] = wrapper.findAll('div')
196-
const $closebutton = $div.getComponent(BCloseButton)
197-
expect($closebutton.classes()).toContain('btn-close-white')
198-
})
199-
200191
it('first child div child BCloseButton has not variant class when headerCloseVariant', () => {
201192
const wrapper = mount(BOffcanvas, {
202193
props: {headerCloseVariant: 'warning'},
@@ -206,25 +197,6 @@ describe.skip('offcanvas', () => {
206197
expect($closebutton.classes()).not.toContain('btn-warning')
207198
})
208199

209-
it('first child div child BButton has prop ariaLabel to be default close', () => {
210-
const wrapper = mount(BOffcanvas, {
211-
slots: {'header-close': 'foobar'},
212-
})
213-
const [, $div] = wrapper.findAll('div')
214-
const $bbutton = $div.getComponent(BButton)
215-
expect($bbutton.props('ariaLabel')).toBe('Close')
216-
})
217-
218-
it('first child div child BButton has prop ariaLabel to be prop headerCloseLabel', () => {
219-
const wrapper = mount(BOffcanvas, {
220-
props: {headerCloseLabel: 'foobar'},
221-
slots: {'header-close': 'foobar'},
222-
})
223-
const [, $div] = wrapper.findAll('div')
224-
const $bbutton = $div.getComponent(BButton)
225-
expect($bbutton.props('ariaLabel')).toBe('foobar')
226-
})
227-
228200
it('first child div child BButton has class when prop headerCloseClass', () => {
229201
const wrapper = mount(BOffcanvas, {
230202
props: {headerCloseClass: 'foobar'},
@@ -235,16 +207,6 @@ describe.skip('offcanvas', () => {
235207
expect($bbutton.classes()).toContain('foobar')
236208
})
237209

238-
it('first child div child BButton has class when prop headerCloseWhite', () => {
239-
const wrapper = mount(BOffcanvas, {
240-
props: {headerCloseWhite: true},
241-
slots: {'header-close': 'foobar'},
242-
})
243-
const [, $div] = wrapper.findAll('div')
244-
const $bbutton = $div.getComponent(BButton)
245-
expect($bbutton.classes()).not.toContain('btn-close-white')
246-
})
247-
248210
it('first child div child BButton has variant class when headerCloseVariant', () => {
249211
const wrapper = mount(BOffcanvas, {
250212
props: {headerCloseVariant: 'warning'},

0 commit comments

Comments
 (0)