Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(*): fixable eslint-plugin-vuejs-accessibility issues [KHCP-11024] #2345

Merged
merged 9 commits into from
Aug 21, 2024
2 changes: 1 addition & 1 deletion src/components/KCollapse/KCollapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:aria-label="triggerLabel ? undefined : 'Toggle content'"
class="collapse-trigger-content"
data-testid="collapse-trigger-content"
role="button"
type="button"
@click.prevent.stop="toggleDisplay()"
>
<slot name="trigger-content">
Expand Down
8 changes: 3 additions & 5 deletions src/components/KMultiselect/KMultiselectItem.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<template>
<div
:key="item.key"
:aria-selected="item.selected"
class="multiselect-item"
:data-testid="`multiselect-item-${item.value}`"
role="listitem"
role="option"
>
<div
class="multiselect-item-container"
role="option"
>
<div class="multiselect-item-container">
<button
:class="{ selected: item.selected }"
:disabled="item.disabled === true ? true : undefined"
Expand Down
2 changes: 1 addition & 1 deletion src/components/KSelect/KSelect.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ describe('KSelect', () => {
})

cy.get('.select-input input').click()
cy.getTestId(`select-item-${vals[0]}`).eq(0).click({ force: true }).then(() => {
cy.getTestId(`select-item-${vals[0]}`).click().then(() => {
cy.wrap(Cypress.vueWrapper.emitted()).should('have.property', 'selected')
cy.wrap(Cypress.vueWrapper.emitted().selected).should('have.length', 1)

Expand Down
9 changes: 4 additions & 5 deletions src/components/KSelect/KSelectItem.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
<template>
<div
:key="item.key"
:aria-selected="item.selected"
class="select-item"
:data-testid="`select-item-${item.value}`"
@click="handleClick"
role="option"
>
<div
class="select-item-container"
role="option"
>
<div class="select-item-container">
<button
:class="{ selected: item.selected }"
:disabled="item.disabled === true ? true : undefined"
type="button"
:value="item.value"
@click="handleClick"
adamdehaven marked this conversation as resolved.
Show resolved Hide resolved
>
<span class="select-item-label">
<slot name="content">{{ item.label }}</slot>
Expand Down