diff --git a/ui/playground/src/pages/layout/layout-container-drawer-loop.vue b/ui/playground/src/pages/layout/layout-container-drawer-loop.vue
index e48dacc0749..e58c9bc28a4 100644
--- a/ui/playground/src/pages/layout/layout-container-drawer-loop.vue
+++ b/ui/playground/src/pages/layout/layout-container-drawer-loop.vue
@@ -30,6 +30,8 @@
side="right"
v-model="drawer"
bordered
+ aria-label="This is an ARIA-Label"
+ test-attribute="This is an Test attribute"
>
Drawer {{ n }} / {{ contentSize * 2 + 5 }}
diff --git a/ui/playground/src/pages/layout/layout-drawer-loop.vue b/ui/playground/src/pages/layout/layout-drawer-loop.vue
index 9d200c22dd7..086e3eea0d5 100644
--- a/ui/playground/src/pages/layout/layout-drawer-loop.vue
+++ b/ui/playground/src/pages/layout/layout-drawer-loop.vue
@@ -18,6 +18,8 @@
side="right"
v-model="drawer"
bordered
+ aria-label="This is an ARIA-Label"
+ test-attribute="This is an Test attribute"
>
Drawer {{ n }} / {{ contentSize }}
diff --git a/ui/src/components/drawer/QDrawer.js b/ui/src/components/drawer/QDrawer.js
index 725db89ea77..25982ef4907 100644
--- a/ui/src/components/drawer/QDrawer.js
+++ b/ui/src/components/drawer/QDrawer.js
@@ -671,9 +671,23 @@ export default createComponent({
}
const mini = isMini.value === true && slots.mini !== void 0
+
+ const sortedAttrs = Object.entries(attrs).reduce(
+ (acc, [ key, value ]) => {
+ if (key.startsWith('aria-label')) {
+ acc.labelAttibutes[ key ] = value
+ }
+ else {
+ acc.other[ key ] = value
+ }
+ return acc
+ },
+ { labelAttibutes: {}, other: {} }
+ )
+
const content = [
h('div', {
- ...attrs,
+ ...sortedAttrs.other,
key: '' + mini, // required otherwise Vue will not diff correctly
class: [
contentClass.value,
@@ -696,7 +710,7 @@ export default createComponent({
child.push(
hDir(
'aside',
- { ref: 'content', class: classes.value, style: style.value },
+ { ref: 'content', class: classes.value, style: style.value, ...sortedAttrs.labelAttributes },
content,
'contentclose',
props.noSwipeClose !== true && belowBreakpoint.value === true,