Skip to content

fix(tooltip): tooltip sample not working with keyboard navigation. #15111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/material-examples/tooltip-manual/tooltip-manual-example.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<div>
<span> Mouse over to </span>
<span> Click the following buttons to... </span>
<button mat-button
(mouseenter)="tooltip.show()"
aria-label="Button that progamatically shows a tooltip on another button"
(click)="tooltip.show()"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the new behavior, I think the aria-label attributes should be updated to just say, e.g.
"Show tooltip on the button at the end of this section"

aria-label="Show tooltip on the button at the end of this section"
class="example-action-button">
show
</button>
<button mat-button
(mouseenter)="tooltip.hide()"
aria-label="Button that progamatically hides a tooltip on another button"
(click)="tooltip.hide()"
aria-label="Hide tooltip on the button at the end of this section"
class="example-action-button">
hide
</button>
<button mat-button
(mouseenter)="tooltip.toggle()"
aria-label="Button that progamatically toggles a tooltip on another button to show/hide"
(click)="tooltip.toggle()"
aria-label="Show/Hide tooltip on the button at the end of this section"
class="example-action-button">
toggle show/hide
</button>
Expand All @@ -25,4 +25,4 @@
matTooltipPosition="right"
aria-tooltip="Button that displays and hides a tooltip triggered by other buttons">
Action
</button>
</button>