Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/runtime/components/Slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ function onChange(value: any) {
disable-closing-trigger
v-bind="(typeof tooltip === 'object' ? tooltip : {})"
>
<SliderThumb data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" />
<SliderThumb data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
</UTooltip>
<SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" />
<SliderThumb v-else data-slot="thumb" :class="ui.thumb({ class: props.ui?.thumb })" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
</template>
</SliderRoot>
</template>
12 changes: 1 addition & 11 deletions test/components/Slider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,7 @@ describe('Slider', () => {

}
})
expect(await axe(wrapper.element, {
rules: {
// "ARIA input fields must have an accessible name (aria-input-field-name)"

// Fix any of the following:
// aria-label attribute does not exist or is empty
// aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
// Element has no title attribute
'aria-input-field-name': { enabled: false }
}
})).toHaveNoViolations()
expect(await axe(wrapper.element)).toHaveNoViolations()
})

describe('emits', () => {
Expand Down
Loading
Loading