+6
-9
lines changedFilter options
+6
-9
lines changed Original file line number Diff line number Diff line change
@@ -422,15 +422,17 @@ export const BModal = /*#__PURE__*/ Vue.extend({
422
422
}
423
423
},
424
424
computedModalAttrs() {
425
+
const { isVisible, ariaLabel } = this
426
+
425
427
return {
426
428
id: this.modalId,
427
429
role: 'dialog',
428
-
'aria-hidden': this.isVisible ? null : 'true',
429
-
'aria-modal': this.isVisible ? 'true' : null,
430
-
'aria-label': this.ariaLabel,
430
+
'aria-hidden': isVisible ? null : 'true',
431
+
'aria-modal': isVisible ? 'true' : null,
432
+
'aria-label': ariaLabel,
431
433
'aria-labelledby':
432
434
this.hideHeader ||
433
-
this.ariaLabel ||
435
+
ariaLabel ||
434
436
// TODO: Rename slot to `title` and deprecate `modal-title`
435
437
!(this.hasNormalizedSlot('modal-title') || this.titleHtml || this.title)
436
438
? null
@@ -994,7 +996,6 @@ export const BModal = /*#__PURE__*/ Vue.extend({
994
996
staticClass: 'modal-content',
995
997
class: this.contentClass,
996
998
attrs: {
997
-
role: 'document',
998
999
id: this.modalContentId,
999
1000
tabindex: '-1'
1000
1001
}
Original file line number Diff line number Diff line change
@@ -74,8 +74,6 @@ describe('modal', () => {
74
74
expect($content.exists()).toBe(true)
75
75
expect($content.attributes('tabindex')).toBeDefined()
76
76
expect($content.attributes('tabindex')).toEqual('-1')
77
-
expect($content.attributes('role')).toBeDefined()
78
-
expect($content.attributes('role')).toEqual('document')
79
77
80
78
wrapper.destroy()
81
79
})
@@ -158,8 +156,6 @@ describe('modal', () => {
158
156
expect($content.exists()).toBe(true)
159
157
expect($content.attributes('tabindex')).toBeDefined()
160
158
expect($content.attributes('tabindex')).toEqual('-1')
161
-
expect($content.attributes('role')).toBeDefined()
162
-
expect($content.attributes('role')).toEqual('document')
163
159
164
160
wrapper.destroy()
165
161
})
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4