Use aria descriptions instead of labels for TextWithTooltip (#10952)
* Use aria descriptions instead of labels for TextWithTooltip to prevent clobbering the reading of the content * Update snapshot * Fix snapshots * Iterate * Update snapshots * delint
This commit is contained in:
parent
f4a265b2c7
commit
f52fab39fc
23 changed files with 78 additions and 7 deletions
|
@ -19,6 +19,11 @@ import React from "react";
|
|||
|
||||
import FilteredDeviceListHeader from "../../../../../src/components/views/settings/devices/FilteredDeviceListHeader";
|
||||
|
||||
// Fake random strings to give a predictable snapshot for IDs
|
||||
jest.mock("matrix-js-sdk/src/randomstring", () => ({
|
||||
randomString: () => "abdefghi",
|
||||
}));
|
||||
|
||||
describe("<FilteredDeviceListHeader />", () => {
|
||||
const defaultProps = {
|
||||
selectedDeviceCount: 0,
|
||||
|
|
|
@ -7,6 +7,7 @@ exports[`<FilteredDeviceListHeader /> renders correctly when all devices are sel
|
|||
data-testid="test123"
|
||||
>
|
||||
<div
|
||||
aria-describedby="mx_TooltipTarget_abdefghi"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
|
@ -51,6 +52,7 @@ exports[`<FilteredDeviceListHeader /> renders correctly when no devices are sele
|
|||
data-testid="test123"
|
||||
>
|
||||
<div
|
||||
aria-describedby="mx_TooltipTarget_abdefghi"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
|
|
|
@ -53,6 +53,11 @@ import { getClientInformationEventType } from "../../../../../../src/utils/devic
|
|||
|
||||
mockPlatformPeg();
|
||||
|
||||
// Fake random strings to give a predictable snapshot for IDs
|
||||
jest.mock("matrix-js-sdk/src/randomstring", () => ({
|
||||
randomString: () => "abdefghi",
|
||||
}));
|
||||
|
||||
describe("<SessionManagerTab />", () => {
|
||||
const aliceId = "@alice:server.org";
|
||||
const deviceId = "alices_device";
|
||||
|
|
|
@ -328,6 +328,7 @@ exports[`<SessionManagerTab /> goes to filtered list from security recommendatio
|
|||
class="mx_FilteredDeviceListHeader"
|
||||
>
|
||||
<div
|
||||
aria-describedby="mx_TooltipTarget_abdefghi"
|
||||
tabindex="0"
|
||||
>
|
||||
<span
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue