Skip to content

Commit

Permalink
fix(a11y): Add role="list" on the list, fixes quasarframework#17439
Browse files Browse the repository at this point in the history
  • Loading branch information
mett-development committed Aug 16, 2024
1 parent 73add64 commit e6d2204
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ui/src/components/item/QList.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ export default createComponent({
+ (props.padding === true ? ' q-list--padding' : '')
)

return () => h(props.tag, { class: classes.value }, hSlot(slots.default))
const role = computed(() => {
if (props.tag === 'ul') return undefined
if (props.tag === 'ol') return undefined
return 'list'
})

return () => h(props.tag, { class: classes.value, role: role.value }, hSlot(slots.default))
}
})

0 comments on commit e6d2204

Please # to comment.