Ensure tooltip contents is linked via aria to the target element (#10729)
* Ensure tooltip contents is linked via aria to the target element * Iterate * Fix tests * Fix tests * Update snapshot * Fix missing aria labels for more tooltips * Iterate * Update snapshots
This commit is contained in:
parent
8e962f6897
commit
99ac9e5029
22 changed files with 133 additions and 43 deletions
|
@ -322,7 +322,7 @@ describe("<UserInfo />", () => {
|
|||
renderComponent({ room: mockRoom });
|
||||
await act(flushPromises);
|
||||
|
||||
const userHeading = screen.getByRole("heading", { name: defaultUserId });
|
||||
const userHeading = screen.getByRole("heading", { name: /@user:example.com/ });
|
||||
|
||||
// there should be a "normal" E2E padlock
|
||||
expect(userHeading.getElementsByClassName("mx_E2EIcon_normal")).toHaveLength(1);
|
||||
|
@ -333,7 +333,7 @@ describe("<UserInfo />", () => {
|
|||
renderComponent({ room: mockRoom });
|
||||
await act(flushPromises);
|
||||
|
||||
const userHeading = screen.getByRole("heading", { name: defaultUserId });
|
||||
const userHeading = screen.getByRole("heading", { name: /@user:example.com/ });
|
||||
|
||||
// there should be a "verified" E2E padlock
|
||||
expect(userHeading.getElementsByClassName("mx_E2EIcon_verified")).toHaveLength(1);
|
||||
|
@ -368,7 +368,7 @@ describe("<UserInfoHeader />", () => {
|
|||
|
||||
it("renders an e2e icon in the header if e2eStatus prop is defined", () => {
|
||||
renderComponent({ e2eStatus: E2EStatus.Normal });
|
||||
const header = screen.getByRole("heading", { name: defaultUserId });
|
||||
const header = screen.getByRole("heading");
|
||||
|
||||
expect(header.getElementsByClassName("mx_E2EIcon")).toHaveLength(1);
|
||||
});
|
||||
|
|
|
@ -40,6 +40,7 @@ exports[`<RoomSummaryCard /> renders the room summary 1`] = `
|
|||
/>
|
||||
</span>
|
||||
<div
|
||||
aria-label="Not encrypted"
|
||||
class="mx_TextWithTooltip_target mx_RoomSummaryCard_e2ee"
|
||||
tabindex="0"
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue