Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* docs(tooltip): tooltip docs cleanup * docs(tooltip): removed unsued images * docs(tooltip): added feedback to each docs page and usage to code page * docs(tooltip): edited alt text and removed a11y tab for now * docs(tooltip): fixed spacing issue * docs(tooltip): fixed a br that was an hr * docs(tooltip): added changeset * docs(tooltip): added sample component * refactor(tooltip): private css prop name * feat(tooltip): add conventional css props * docs(tooltip): css props * chore: tweak stylelint config * style: lint css files * docs(tooltip):Updated .changeset/nasty-flies-flash.md Co-authored-by: Benny Powers <bennypowers@users.noreply.github.com> * docs(tooltip): updated tooltip docs and added accessibility page * docs(tooltip): added kbd markup to accessibility page's keyboard table * docs(tooltip): fixed linting issue * docs(tooltip): fixed issue on code page * docs(tooltip): fixed headings and dark image styles based on PR feedback * docs(tooltip): fixed column widths on tables * docs(tooltip): updated spacer to new shortcode --------- Co-authored-by: Benny Powers <web@bennypowers.com> Co-authored-by: Benny Powers <bennypowers@users.noreply.github.com>
- Loading branch information
1 parent
c7c9763
commit 6179400
Showing
9 changed files
with
56 additions
and
58 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Keyboard interactions | ||
A tooltip will appear when the trigger receives focus and disappear when moving focus away from the trigger. | ||
|
||
{% example palette="light", | ||
alt="Tooltip keyboard interactions; pressing tab to focus the trigger will show the tooltip, but pressing tab again will hide the tooltip", | ||
src="../tooltip-keyboard-interactions.png" %} | ||
|
||
|
||
| Key {style="width: 50%" } | Result | | ||
| ------------------------- | ------------------------------------------------------------ | | ||
| <kbd>Tab</kbd> | Moves focus to the trigger, tooltip appear | | ||
| <kbd>Tab</kbd> | Moves focus away from the trigger, tooltip disappears | | ||
| <kbd>Esc</kbd> | Removes a tooltip without moving focus away from the trigger | | ||
|
||
## Additional guidelines | ||
- Do not use a tooltip on static elements | ||
- A tooltip should persist while hovering over the trigger and tooltip | ||
- A tooltip should persist as long as the trigger has focus | ||
- Users navigating via screen reader must have tooltip text announced to them when it is triggered | ||
- If a tooltip is added to a disabled trigger, that trigger must be able to receive focus | ||
|
||
{% include 'accessibility/ariaguide.md' %} | ||
{% include 'accessibility/wcag.md' %} | ||
{% include 'accessibility/2.1.1-A.md' %} | ||
{% include 'accessibility/2.1.3-AAA.md' %} | ||
{% include 'accessibility/2.4.3-A.md' %} | ||
{% include 'accessibility/2.5.5-AAA.md' %} |
Binary file not shown.
Binary file not shown.
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