| Summary: | AX: Make crash-in-element-for-text-marker.html and aria-liveregions-attributes.html async-friendly so they can pass in ITM | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tyler Wilcock <tyler_w> | ||||||
| Component: | Accessibility | Assignee: | Tyler Wilcock <tyler_w> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | Other | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Tyler Wilcock
2022-12-01 00:37:36 PST
Created attachment 463826 [details]
Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 463826 [details] > Patch --- a/LayoutTests/resources/accessibility-helper.js +++ b/LayoutTests/resources/accessibility-helper.js @@ -177,6 +177,11 @@ async function expectAsyncExpression(expression, expectedValue) { debug(`PASS ${evalExpression}`); } +async function waitForFocus(id) { + document.getElementById(id).focus(); + await waitFor(() => accessibilityController.focusedElement && accessibilityController.focusedElement.domIdentifier === id); +} Would it be a bit more performant if we don't call accessibilityController.focusedElement twice? This may be called a bunch of times like in the first test in this patch. Created attachment 463837 [details]
Patch
Committed 257319@main (fb7087c033ee): <https://commits.webkit.org/257319@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463837 [details]. |