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:
Michael Telatynski 2023-05-25 09:42:09 +01:00 committed by GitHub
parent f4a265b2c7
commit f52fab39fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 78 additions and 7 deletions

View file

@ -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,

View file

@ -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

View file

@ -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";

View file

@ -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