Skip to content

Commit b401843

Browse files
committed
fix some tests and accessibilities
1 parent 35fe46d commit b401843

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/packages/tour/components/TourTooltip.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,11 @@ const Buttons = ({
331331
};
332332

333333
export const Header = ({
334-
text,
335334
title,
336335
skipLabel,
337336
renderAsHtml,
338337
onSkipClick,
339338
}: {
340-
text: string;
341339
title: string;
342340
skipLabel: string;
343341
renderAsHtml?: boolean;
@@ -468,7 +466,7 @@ export const TourTooltip = ({
468466
const text = step.intro;
469467
const position = step.position;
470468

471-
children.push(Header({ text, title, skipLabel, renderAsHtml, onSkipClick }));
469+
children.push(Header({ title, skipLabel, renderAsHtml, onSkipClick }));
472470

473471
children.push(
474472
TooltipContent({

src/packages/tour/mock.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
dataPosition,
77
dataStepAttribute,
88
} from "./dataAttributes";
9+
import { title } from "process";
910

1011
const { div, b, a, h1 } = dom.tags;
1112

@@ -23,7 +24,7 @@ export const appendMockSteps = (targetElement: HTMLElement = document.body) => {
2324
"Mock element second to last"
2425
);
2526
mockElementThree.setAttribute(dataStepAttribute, "10");
26-
27+
mockElementThree.setAttribute(title, "this is title");
2728
const mockElementFour = a();
2829
mockElementFour.setAttribute(dataIntroAttribute, "Mock element last");
2930
mockElementFour.setAttribute(dataStepAttribute, "20");
@@ -54,12 +55,14 @@ export const getMockPartialSteps = (): Partial<TourStep>[] => {
5455
element: "h1",
5556
},
5657
{
58+
title: "second title",
5759
intro: "Step Four of the tour",
5860
position: "right",
5961
scrollTo: "off",
6062
element: document.createElement("div"),
6163
},
6264
{
65+
title: "third title",
6366
element: ".not-found",
6467
intro: "Element not found",
6568
},

0 commit comments

Comments
 (0)