You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/components/primer/alpha/tooltip.rb
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,8 @@ module Alpha
14
14
# - **Never set tooltips on static, non-interactive elements** like `span` or `div`. Tooltips should only be used on interactive elements like buttons or links to avoid excluding keyboard-only
15
15
# and screen reader users. Use of tooltips through <%= link_to_component(Primer::Beta::Button) %>, <%= link_to_component(Primer::Beta::Link) %>, or <%= link_to_component(Primer::Beta::IconButton) %> will guarantee this.
16
16
# - If you must use `Tooltip` as a standalone component, place it immediately after the trigger element in the DOM. This allows screen reader users to navigate to the tooltip and copy its contents if desired.
17
-
# content.
18
17
#
19
-
# Semantically, a tooltip will either act an accessible name or an accessible description for the element that it is associated with resulting in either a
18
+
# Semantically, a tooltip will either act as an accessible name or an accessible description for the element that it is associated with resulting in either an
20
19
# `aria-labelledby` or an `aria-describedby` association. The `type` drastically changes semantics and screen reader behavior so follow these guidelines carefully:
21
20
# - When there is already a visible label text on the trigger element, the tooltip is likely intended be supplementary, so set `type: :description`.
22
21
# The majority of tooltips will fall under this category.
0 commit comments