diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index c29629ca..7ee10f7f 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -22,6 +22,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Fixed a bug in `` that caused the trigger and color preview to ignore opacity on first render [#869](https://github.com/shoelace-style/shoelace/issues/869) - Fixed a bug in `` that prevented the keyboard from working when the component was nested in a shadow root [#871](https://github.com/shoelace-style/shoelace/issues/871) - Fixed a bug in `` that prevented the keyboard from working when the component was nested in a shadow root [#872](https://github.com/shoelace-style/shoelace/issues/872) +- Fixed a bug in `` that allowed disabled tabs to erroneously receive focus - Improved single selection in `` so nodes expand and collapse and receive selection when clicking on the label - Renamed `expanded-icon` and `collapsed-icon` slots to `expand-icon` and `collapse-icon` in the experimental `` and `` components - Improved RTL support for `` diff --git a/src/components/tab/tab.ts b/src/components/tab/tab.ts index da1509d2..089f3882 100644 --- a/src/components/tab/tab.ts +++ b/src/components/tab/tab.ts @@ -88,7 +88,7 @@ export default class SlTab extends ShoelaceElement { 'tab--closable': this.closable, 'tab--disabled': this.disabled })} - tabindex="0" + tabindex=${this.disabled ? '-1' : '0'} > ${this.closable