- Notifications
You must be signed in to change notification settings - Fork 0
fix: remediate P2 audit findings (Phases 1 and 2) [Antigravity)#1298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
986ffd24265b3e43795bcc60953b6f06b84c89756f648a6297f75c39f8d4d17dc47256738643d7156310111aee54de7ec8b503f3b065f76cbdca7dd8ec6bee439dbeb270fb5dde14ee229e30d9f829b5a56536a41b8b57aab43974506dce0feabb35bcc70ce319acc8ecc3493d3f52f167d6ce83d5ed37dcf3348730adb1856e22eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -215,21 +215,32 @@ export function Sheet({ | ||
| // options) do not dump every inactive item into the Tab cycle. | ||
| 'a[href], button:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), summary, [tabindex]:not([tabindex="-1"])', | ||
| ) ?? [], | ||
| ).filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-hidden") !== "true"); | ||
| ).filter( | ||
| (element) => | ||
| !element.hasAttribute("disabled") && | ||
| element.getAttribute("aria-hidden") !== "true" && | ||
| element.tabIndex >= 0 && | ||
| !element.closest('[aria-hidden="true"], [inert]') && | ||
| element.getClientRects().length > 0, | ||
| ); | ||
| if (focusable.length === 0) return; | ||
| const first = focusable[0]; | ||
| const last = focusable[focusable.length - 1]; | ||
| if (panelRef.current && !panelRef.current.contains(document.activeElement)) { | ||
| event.preventDefault(); | ||
| (event.shiftKey ? last : first).focus(); | ||
| } else if (event.shiftKey && document.activeElement === first) { | ||
| event.preventDefault(); | ||
| last.focus(); | ||
| } else if (!event.shiftKey && document.activeElement === last) { | ||
| event.preventDefault(); | ||
| first.focus(); | ||
| } | ||
| const activeElement = document.activeElement instanceof HTMLElement ? document.activeElement : null; | ||
| const currentIndex = activeElement ? focusable.indexOf(activeElement) : -1; | ||
| const nextIndex = | ||
| currentIndex === -1 | ||
| ? event.shiftKey | ||
| ? focusable.length - 1 | ||
| : 0 | ||
| : event.shiftKey | ||
| ? (currentIndex - 1 + focusable.length) % focusable.length | ||
| : (currentIndex + 1) % focusable.length; | ||
| // Move focus explicitly instead of relying on platform Tab preferences. | ||
| // Firefox can otherwise leave programmatically focused buttons out of the | ||
| // native sequence, which makes the modal trap inconsistent by browser. | ||
| event.preventDefault(); | ||
| focusable[nextIndex].focus(); | ||
BigSimmo marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| window.addEventListener("keydown", onKeyDown); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -111,7 +111,9 @@ test("keeps mobile search, domain filtering, record actions, and universal chrom | ||
| await expectNoHorizontalOverflow(page); | ||
| await page.getByRole("link", { name: "Open Worry" }).click(); | ||
| await expect(page).toHaveURL(/\/formulation\/worry$/, { timeout: 30_000 }); | ||
| await expect(async () => { | ||
| await expect(page).toHaveURL(/\/formulation\/worry$/); | ||
| }).toPass({ timeout: 30_000 }); | ||
cursor[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| await expect(page.getByRole("heading", { name: "Worry", exact: true })).toBeVisible({ timeout: 30_000 }); | ||
| await expect(page.getByRole("link", { name: "Compare", exact: true }).last()).toBeVisible(); | ||
| await expect(page.getByRole("link", { name: "Use in formulation", exact: true }).first()).toBeVisible(); | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.