From ce779e0119af8704f624c9a28c765ce6ff95b89e Mon Sep 17 00:00:00 2001 From: Mohammad Seyfayi Date: Sat, 11 May 2024 18:20:10 +0330 Subject: [PATCH] feat(stepper): add aria-* attributes --- src/stepper/stepper.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/stepper/stepper.ts b/src/stepper/stepper.ts index 1bf3bfb3..7ac583e3 100644 --- a/src/stepper/stepper.ts +++ b/src/stepper/stepper.ts @@ -32,6 +32,7 @@ export class Stepper extends LitElement { type="button" part="decrease-button" variant="ghost" + tabindex="-1" @click=${this.handleDecrease} ?disabled=${this.disabled || this.value <= this.min} > @@ -40,13 +41,22 @@ export class Stepper extends LitElement { .height=${iconSize} > -

${this.value}

- ${this.unit ? html`

${this.unit}

` : nothing} + + ${this.value} + ${this.unit ? html`${this.unit}` : nothing} + = this.max} >