-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tooltip): announce content to assistive technology (#2069)
* feat(tooltip): add ESC to close functionality * refactor(tooltip): rename CSS class * fix(tooltip): add `aria-describedby`/`id` pair * chore(tooltip): add changeset * fix(tooltip): remove slotchange handler functions * fix(tooltip): use native `<button>` with `aria-describedby`/ IDREF pair * docs(tooltip): add a11y markup guidance around `<button>`/`<rh-button>` * fix(tooltip): attach event listener to `globalThis` for improved performance * fix(tooltip): announce content * fix(tooltip): global announcer * test(tooltip): ax queries * fix(tooltip): surrender to compilers * fix(tooltip): crossbrowser aria * docs(tooltip): remove test icon * fix(tooltip): revert regression * perf(tooltip): shave bytes * fix(tooltip): use logical properties for announcer * docs(tooltip): remove outdated a11y docs * fix(tooltip): re-add `<rh-button>` to tooltip demos * fix(tooltip): prune unused class * fix(tooltip): change `aria-live` to `role: status` --------- Co-authored-by: Benny Powers <[email protected]> Co-authored-by: Benny Powers - עם ישראל חי! <[email protected]>
- Loading branch information
1 parent
3d076da
commit 8dd9a5f
Showing
6 changed files
with
77 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rhds/elements": patch | ||
--- | ||
|
||
`<rh-tooltip>`: make tooltip content available to assistive technology |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<rh-tooltip content="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | ||
labore et dolore magna aliqua. Mi eget mauris pharetra et ultrices."> | ||
<rh-button>Tooltip</rh-button> | ||
</rh-tooltip> | ||
|
||
<script type="module"> | ||
import '@rhds/elements/rh-button/rh-button.js'; | ||
import '@rhds/elements/rh-tooltip/rh-tooltip.js'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ | |
import '@rhds/elements/rh-button/rh-button.js'; | ||
import '@rhds/elements/rh-tooltip/rh-tooltip.js'; | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters