fix tabindex when readonly; fixes #2271 (#2272)

pull/2293/head
Cory LaViska 2024-11-15 12:12:54 -05:00 zatwierdzone przez GitHub
rodzic 620edc2efd
commit c232214445
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -21,6 +21,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti
- Fixed a bug in `<sl-textarea>` that caused a console warning in Firefox when typing [#2107]
- Fixed a bug in `<sl-carousel>` that caused interactive elements to be activated when dragging [#2196]
- Fixed a bug in `<sl-carousel>` that caused out of order slides when used inside a resize observer [#2260]
- Fixed a bug in `<sl-rating>` that allowed tabbing into the rating when readonly [#2271]
- Improved performance of `<sl-range>` by skipping positioning logic when tooltip isn't shown [#2064]
## 2.18.0

Wyświetl plik

@ -240,7 +240,7 @@ export default class SlRating extends ShoelaceElement {
aria-valuenow=${this.value}
aria-valuemin=${0}
aria-valuemax=${this.max}
tabindex=${this.disabled ? '-1' : '0'}
tabindex=${this.disabled || this.readonly ? '-1' : '0'}
@click=${this.handleClick}
@keydown=${this.handleKeyDown}
@mouseenter=${this.handleMouseEnter}