Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 64f36e2

Browse files
Shi Shucopybara-github
authored andcommitted
test(tooltip): Change rich tooltip tests to use div and proper aria roles instead of aside.
PiperOrigin-RevId: 349321251
1 parent fb194dd commit 64f36e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/mdc-tooltip/test/component.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ describe('MDCTooltip', () => {
269269
<button aria-describedby="tt0" aria-haspopup="true" aria-expanded="false">
270270
anchor
271271
</button>
272-
<aside id="tt0" class="mdc-tooltip mdc-tooltip--rich" aria-hidden="true">
272+
<div id="tt0" class="mdc-tooltip mdc-tooltip--rich" aria-hidden="true" role="dialog">
273273
<div class="mdc-tooltip__surface">
274274
<h2 class="mdc-tooltip__title">Title</h2>
275275
<p class="mdc-tooltip__content">Content <a class="mdc-tooltip__content-link" href="google.com">link</a></p>
@@ -280,7 +280,7 @@ describe('MDCTooltip', () => {
280280
</button>
281281
</div>
282282
</div>
283-
</aside>
283+
</div>
284284
</div>`);
285285
document.body.appendChild(fixture);
286286
});
@@ -496,13 +496,13 @@ describe('MDCTooltip', () => {
496496
<button aria-describedby="tt0" aria-haspopup="true" aria-expanded="false">
497497
anchor
498498
</button>
499-
<aside id="tt0" class="mdc-tooltip mdc-tooltip--rich" aria-hidden="true" data-mdc-tooltip-persistent="true">
499+
<div id="tt0" class="mdc-tooltip mdc-tooltip--rich" aria-hidden="true" data-mdc-tooltip-persistent="true" role="tooltip" tabindex="-1">
500500
<div class="mdc-tooltip__surface">
501501
<p class="mdc-tooltip__content">
502502
demo tooltip
503503
</p>
504504
</div>
505-
</aside>
505+
</div>
506506
</div>`);
507507
document.body.appendChild(fixture);
508508
});

0 commit comments

Comments
 (0)