Skip to content

Commit 41a41fb

Browse files
authored
fix(VPagination): Update ARIA keys for child VBtn attributes (#18886)
fixes #18885
1 parent 31f7914 commit 41a41fb

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

packages/vuetify/src/components/VPagination/VPagination.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ type ControlSlot = {
4040
icon: IconValue
4141
onClick: (e: Event) => void
4242
disabled: boolean
43-
ariaLabel: string
44-
ariaDisabled: boolean
43+
'aria-label': string
44+
'aria-disabled': boolean
4545
}
4646

4747
export type VPaginationSlots = {
@@ -264,8 +264,8 @@ export const VPagination = genericComponent<VPaginationSlots>()({
264264
icon: true,
265265
disabled: !!props.disabled || +props.length < 2,
266266
color: isActive ? props.activeColor : props.color,
267-
ariaCurrent: isActive,
268-
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
267+
'aria-current': isActive,
268+
'aria-label': t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
269269
onClick: (e: Event) => setValue(e, item),
270270
},
271271
}
@@ -282,29 +282,29 @@ export const VPagination = genericComponent<VPaginationSlots>()({
282282
icon: isRtl.value ? props.lastIcon : props.firstIcon,
283283
onClick: (e: Event) => setValue(e, start.value, 'first'),
284284
disabled: prevDisabled,
285-
ariaLabel: t(props.firstAriaLabel),
286-
ariaDisabled: prevDisabled,
285+
'aria-label': t(props.firstAriaLabel),
286+
'aria-disabled': prevDisabled,
287287
} : undefined,
288288
prev: {
289289
icon: isRtl.value ? props.nextIcon : props.prevIcon,
290290
onClick: (e: Event) => setValue(e, page.value - 1, 'prev'),
291291
disabled: prevDisabled,
292-
ariaLabel: t(props.previousAriaLabel),
293-
ariaDisabled: prevDisabled,
292+
'aria-label': t(props.previousAriaLabel),
293+
'aria-disabled': prevDisabled,
294294
},
295295
next: {
296296
icon: isRtl.value ? props.prevIcon : props.nextIcon,
297297
onClick: (e: Event) => setValue(e, page.value + 1, 'next'),
298298
disabled: nextDisabled,
299-
ariaLabel: t(props.nextAriaLabel),
300-
ariaDisabled: nextDisabled,
299+
'aria-label': t(props.nextAriaLabel),
300+
'aria-disabled': nextDisabled,
301301
},
302302
last: props.showFirstLastPage ? {
303303
icon: isRtl.value ? props.firstIcon : props.lastIcon,
304304
onClick: (e: Event) => setValue(e, start.value + length.value - 1, 'last'),
305305
disabled: nextDisabled,
306-
ariaLabel: t(props.lastAriaLabel),
307-
ariaDisabled: nextDisabled,
306+
'aria-label': t(props.lastAriaLabel),
307+
'aria-disabled': nextDisabled,
308308
} : undefined,
309309
}
310310
})

packages/vuetify/src/components/VWindow/VWindow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type ControlProps = {
4444
icon: IconValue
4545
class: string
4646
onClick: () => void
47-
ariaLabel: string
47+
'aria-label': string
4848
}
4949

5050
export const VWindowSymbol: InjectionKey<WindowProvide> = Symbol.for('vuetify:v-window')
@@ -175,7 +175,7 @@ export const VWindow = genericComponent<new <T>(
175175
icon: isRtl.value ? props.nextIcon : props.prevIcon,
176176
class: `v-window__${isRtlReverse.value ? 'right' : 'left'}`,
177177
onClick: group.prev,
178-
ariaLabel: t('$vuetify.carousel.prev'),
178+
'aria-label': t('$vuetify.carousel.prev'),
179179
}
180180

181181
arrows.push(canMoveBack.value
@@ -189,7 +189,7 @@ export const VWindow = genericComponent<new <T>(
189189
icon: isRtl.value ? props.prevIcon : props.nextIcon,
190190
class: `v-window__${isRtlReverse.value ? 'left' : 'right'}`,
191191
onClick: group.next,
192-
ariaLabel: t('$vuetify.carousel.next'),
192+
'aria-label': t('$vuetify.carousel.next'),
193193
}
194194

195195
arrows.push(canMoveForward.value

0 commit comments

Comments
 (0)