docs(tooltip): expand a11y section with guidance on interactions (#11141)

This commit is contained in:
Jeremy Elbourn
2018-05-03 14:57:06 -07:00
committed by Joey Perrott
parent 0b7572bb1f
commit 0e4987713d
+7 -1
View File
@@ -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.