Skip to content

Commit 4974d74

Browse files
authored
fix(VListItem): use item role when in a group (#13126)
fixes #13125
1 parent 9b1356a commit 4974d74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vuetify/src/components/VList/VListItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default baseMixins.extend<options>().extend({
139139
} else if (this.isInNav) {
140140
// do nothing, role is inherit
141141
} else if (this.isInGroup) {
142-
attrs.role = 'listitem'
142+
attrs.role = 'option'
143143
attrs['aria-selected'] = String(this.isActive)
144144
} else if (this.isInMenu) {
145145
attrs.role = this.isClickable ? 'menuitem' : undefined

packages/vuetify/src/components/VList/__tests__/VListItem.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ describe('VListItem.ts', () => {
202202
const wrapper3 = mountFunction({
203203
provide: { isInGroup: true },
204204
})
205-
expect(wrapper3.element.getAttribute('role')).toBe('listitem')
205+
expect(wrapper3.element.getAttribute('role')).toBe('option')
206206

207207
// In menu
208208
const wrapper4 = mountFunction({

0 commit comments

Comments
 (0)