improve tooltip a11y; #219

pull/731/head
Cory LaViska 2022-04-13 09:02:23 -04:00
rodzic fc938ea3eb
commit 4befbfafc5
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -19,6 +19,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Fixed a bug that prevented `<sl-dropdown>` from being closed when opened initially [#720](https://github.com/shoelace-style/shoelace/issues/720)
- Fixed a bug that caused the test runner to fail when using a locale other than en-US [#726](https://github.com/shoelace-style/shoelace/issues/726)
- Improved form submit logic so most user-added event listeners will run after form data is attached and validation occurs [#718](https://github.com/shoelace-style/shoelace/issues/718)
- Improved accessibility of `<sl-tooltip>` so screen readers announce the content on hover/focus [#219](https://github.com/shoelace-style/shoelace/issues/219)
- Updated `<sl-tab-group>` and `<sl-menu>` to cycle through tabs and menu items instead of stopping at the first/last when using the keyboard
- Removed path aliasing (again) because it doesn't work with Web Test Runner's esbuild plugin

Wyświetl plik

@ -331,7 +331,7 @@ export default class SlTooltip extends LitElement {
aria-hidden=${this.open ? 'false' : 'true'}
>
<div class="tooltip__arrow"></div>
<div class="tooltip__content">
<div class="tooltip__content" aria-live=${this.open ? 'polite' : 'off'}>
<slot name="content"> ${this.content} </slot>
</div>
</div>