fix(plex): the player's ⋯ and tracks lists are real menus, and every close returns the focus
They were hand-built divs: no menu roles, no arrow keys, and Escape left the focus on <body>. Both run on the popover engine now (media-tone rows), and the tuning panel is a labelled dialog that takes the focus and hands it back to ⋯.
This commit is contained in:
@@ -261,9 +261,9 @@ describe("the subtitle poll and notice", () => {
|
||||
await screen.findByText("Title A");
|
||||
fireEvent.click(screen.getByLabelText("plex.player.tracks"));
|
||||
const off = await screen.findByText("plex.player.subOff");
|
||||
expect(off.closest("button")?.getAttribute("aria-pressed")).toBe("false");
|
||||
const pressed = document.querySelectorAll('[aria-pressed="true"]');
|
||||
expect([...pressed].map((b) => b.textContent)).toEqual(["English"]); // the saved subtitle
|
||||
expect(off.closest('[role="menuitemradio"]')?.getAttribute("aria-checked")).toBe("false");
|
||||
const checked = document.querySelectorAll('[role="menuitemradio"][aria-checked="true"]');
|
||||
expect([...checked].map((b) => b.textContent)).toEqual(["English"]); // the saved subtitle
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user