Add Tooltip
to AccessibleButton
(#12443)
* Deprecate AccessibleTooltipButton Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Deprecate AccessibleTooltipButton Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix `UserInfo-test.tsx` * Update `LoginWithQRFlow-test.tsx` snapshot * Remove tooltip provider from test * Fix `AccessibleButton` * Update snapshots * Revert to original import * Use title to populate aria-label * Rollback AccessibleButton or Tooltip changes. Will come in another PR * Rollback en.json change * Update snapshots * Fix `UserInfo` * Update snapshots * Use label instead of title in test * Use label instead of title in TAC test * Use label instead of title in read-receipt test * Remove tooltip for ContextMenu * Add extra information for caption field --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
644bf78e2a
commit
700b3955a4
24 changed files with 147 additions and 76 deletions
|
@ -377,12 +377,12 @@ describe("AppTile", () => {
|
|||
});
|
||||
|
||||
it("clicking 'minimise' should send the widget to the right", async () => {
|
||||
await userEvent.click(renderResult.getByTitle("Minimise"));
|
||||
await userEvent.click(renderResult.getByLabelText("Minimise"));
|
||||
expect(moveToContainerSpy).toHaveBeenCalledWith(r1, app1, Container.Right);
|
||||
});
|
||||
|
||||
it("clicking 'maximise' should send the widget to the center", async () => {
|
||||
await userEvent.click(renderResult.getByTitle("Maximise"));
|
||||
await userEvent.click(renderResult.getByLabelText("Maximise"));
|
||||
expect(moveToContainerSpy).toHaveBeenCalledWith(r1, app1, Container.Center);
|
||||
});
|
||||
|
||||
|
@ -435,7 +435,7 @@ describe("AppTile", () => {
|
|||
});
|
||||
|
||||
it("clicking 'un-maximise' should send the widget to the top", async () => {
|
||||
await userEvent.click(renderResult.getByTitle("Un-maximise"));
|
||||
await userEvent.click(renderResult.getByLabelText("Un-maximise"));
|
||||
expect(moveToContainerSpy).toHaveBeenCalledWith(r1, app1, Container.Top);
|
||||
});
|
||||
});
|
||||
|
@ -461,7 +461,7 @@ describe("AppTile", () => {
|
|||
});
|
||||
|
||||
it("should display the »Popout widget« button", () => {
|
||||
expect(renderResult.getByTitle("Popout widget")).toBeInTheDocument();
|
||||
expect(renderResult.getByLabelText("Popout widget")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -13,11 +13,12 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
|
|||
class="mx_BaseCard_header"
|
||||
>
|
||||
<div
|
||||
aria-label="Close"
|
||||
class="mx_AccessibleButton mx_BaseCard_close"
|
||||
data-state="closed"
|
||||
data-testid="base-card-close-button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Close"
|
||||
/>
|
||||
<div
|
||||
class="mx_BaseCard_headerProp"
|
||||
|
@ -37,7 +38,6 @@ exports[`AppTile destroys non-persisted right panel widget on room change 1`] =
|
|||
class="mx_AccessibleButton mx_BaseCard_header_title_button--option"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Options"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -136,20 +136,22 @@ exports[`AppTile for a pinned widget should render 1`] = `
|
|||
class="mx_AppTileMenuBar_widgets"
|
||||
>
|
||||
<div
|
||||
aria-label="Un-maximise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Un-maximise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
aria-label="Minimise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Minimise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
@ -162,7 +164,6 @@ exports[`AppTile for a pinned widget should render 1`] = `
|
|||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Options"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
@ -223,20 +224,22 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
|
|||
class="mx_AppTileMenuBar_widgets"
|
||||
>
|
||||
<div
|
||||
aria-label="Un-maximise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Un-maximise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
aria-label="Minimise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Minimise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
@ -249,7 +252,6 @@ exports[`AppTile for a pinned widget should render permission request 1`] = `
|
|||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Options"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
@ -377,20 +379,22 @@ exports[`AppTile preserves non-persisted widget on container move 1`] = `
|
|||
class="mx_AppTileMenuBar_widgets"
|
||||
>
|
||||
<div
|
||||
aria-label="Maximise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Maximise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
aria-label="Minimise"
|
||||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
data-state="closed"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Minimise"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
@ -403,7 +407,6 @@ exports[`AppTile preserves non-persisted widget on container move 1`] = `
|
|||
class="mx_AccessibleButton mx_AppTileMenuBar_widgets_button"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="Options"
|
||||
>
|
||||
<div
|
||||
class="mx_Icon mx_Icon_12"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue