mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(tooltip): expand a11y section with guidance on interactions (#11141)
This commit is contained in:
committed by
Joey Perrott
parent
0b7572bb1f
commit
0e4987713d
@@ -66,4 +66,10 @@ shown.
|
||||
Elements with the `matTooltip` will add an `aria-describedby` label that provides a reference
|
||||
to a visually hidden element containing the tooltip's message. This provides screenreaders the
|
||||
information needed to read out the tooltip's contents when the end-user focuses on the element
|
||||
triggering the tooltip.
|
||||
triggering the tooltip. The element referenced via `aria-describedby` is not the tooltip itself,
|
||||
but instead an invisible copy of the tooltip content that is always present in the DOM.
|
||||
|
||||
If a tooltip will only be shown manually via click, keypress, etc., then extra care should be taken
|
||||
such that the action behaves similarly for screen-reader users. One possible approach would be
|
||||
to use the `LiveAnnouncer` from the `cdk/a11y` package to announce the tooltip content on such
|
||||
an interaction.
|
||||
|
||||
Reference in New Issue
Block a user