diff --git a/docs/pages/resources/changelog.md b/docs/pages/resources/changelog.md index abedeb21be..fa9625367d 100644 --- a/docs/pages/resources/changelog.md +++ b/docs/pages/resources/changelog.md @@ -21,6 +21,7 @@ New versions of Shoelace are released as-needed and generally occur when a criti - Fixed a bug in `` that caused a console warning in Firefox when typing [#2107] - Fixed a bug in `` that caused interactive elements to be activated when dragging [#2196] - Fixed a bug in `` that caused out of order slides when used inside a resize observer [#2260] +- Fixed a bug in `` that allowed tabbing into the rating when readonly [#2271] - Improved performance of `` by skipping positioning logic when tooltip isn't shown [#2064] ## 2.18.0 diff --git a/src/components/rating/rating.component.ts b/src/components/rating/rating.component.ts index 4279cdd552..0e35070808 100644 --- a/src/components/rating/rating.component.ts +++ b/src/components/rating/rating.component.ts @@ -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}