From dac05f8d06c832cde9f7d70afaeac9535c7139c4 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Thu, 1 Apr 2021 07:50:27 -0400 Subject: [PATCH] improve a11y --- docs/resources/changelog.md | 5 +++-- src/components/button-group/button-group.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/resources/changelog.md b/docs/resources/changelog.md index 284a94693..cba3ccf84 100644 --- a/docs/resources/changelog.md +++ b/docs/resources/changelog.md @@ -8,7 +8,10 @@ _During the beta period, these restrictions may be relaxed in the event of a mis ## Next +- Fixed a bug in `sl-tooltip` where events weren't properly cleaned up on disconnect +- Fixed a bug in `sl-tooltip` where they wouldn't display after toggling `disabled` off and on again [#391](https://github.com/shoelace-style/shoelace/issues/391) - Improved a11y for disabled buttons that are rendered as links +- Improved a11y for `sl-button-group` ## 2.0.0-beta.36 @@ -19,8 +22,6 @@ _During the beta period, these restrictions may be relaxed in the event of a mis - Fixed a bug where `sl-color-picker` could be opened when disabled - Fixed a bug in `sl-color-picker` that caused erratic slider behaviors [#388](https://github.com/shoelace-style/shoelace/issues/388) [#389](https://github.com/shoelace-style/shoelace/issues/389) - Fixed a bug where `sl-details` wouldn't always render the correct height when open initially [#357](https://github.com/shoelace-style/shoelace/issues/357) -- Fixed a bug in `sl-tooltip` where events weren't properly cleaned up on disconnect -- Fixed a bug in `sl-tooltip` where they wouldn't display after toggling `disabled` off and on again [#391](https://github.com/shoelace-style/shoelace/issues/391) - Renamed `components.json` to `metadata.json` - Updated to the prerelease versions of LitElement and lit-html - Updated to Bootstrap Icons 1.4.1 diff --git a/src/components/button-group/button-group.ts b/src/components/button-group/button-group.ts index 43fad5672..33385f9b6 100644 --- a/src/components/button-group/button-group.ts +++ b/src/components/button-group/button-group.ts @@ -15,7 +15,7 @@ export default class SlButtonGroup extends LitElement { static styles = unsafeCSS(styles); /** A label to use for the button group's `aria-label` attribute. */ - @property() label: string; + @property() label = ''; handleFocus(event: CustomEvent) { const button = event.target as HTMLElement; @@ -32,6 +32,7 @@ export default class SlButtonGroup extends LitElement {