WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235246
AX: Fix disabled-controls-not-focusable.html in isolated tree mode by updating AXPropertyName::CanSetFocusAttribute when the disabled attribute changes
https://bugs.webkit.org/show_bug.cgi?id=235246
Summary
AX: Fix disabled-controls-not-focusable.html in isolated tree mode by updatin...
Tyler Wilcock
Reported
2022-01-14 12:29:40 PST
AX: Fix disabled-controls-not-focusable.html in isolated tree mode by updating AXPropertyName::CanSetFocusAttribute when the disabled attribute changes.
Attachments
Patch
(13.64 KB, patch)
2022-01-14 12:36 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(14.48 KB, patch)
2022-01-14 14:16 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Patch
(17.17 KB, patch)
2022-01-14 15:25 PST
,
Tyler Wilcock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-01-14 12:29:52 PST
<
rdar://problem/87613404
>
Tyler Wilcock
Comment 2
2022-01-14 12:36:09 PST
Created
attachment 449207
[details]
Patch
Andres Gonzalez
Comment 3
2022-01-14 13:14:38 PST
(In reply to Tyler Wilcock from
comment #2
)
> Created
attachment 449207
[details]
> Patch
--- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ a/Source/WebCore/accessibility/AXObjectCache.cpp + case AXDisabledStateChanged: + tree->updateNodeProperty(*notification.first, AXPropertyName::CanSetFocusAttribute); + break; Add this same case to the updateIsolatedTree that takes a single notification as opposed to a vector of notifications. --- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h +++ a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h @@ -139,6 +139,7 @@ public: JSRetainPtr<JSStringRef> stringAttributeValue(NSString *attribute) const; double numberAttributeValue(NSString *attribute) const; RetainPtr<id> attributeValue(NSString *) const; + bool isAttributeSettable(NSString *) const; Can we make this private? --- a/LayoutTests/accessibility/disabled-controls-not-focusable.html +++ a/LayoutTests/accessibility/disabled-controls-not-focusable.html + async function checkControl(id) { + window.element = document.getElementById(id); + debug(`Testing #${id}`); + element.focus(); + await waitFor(() => { + window.axElement = accessibilityController.focusedElement; + return axElement && accessibilityController.accessibleElementById(id); + }); + shouldBeTrue("axElement.isFocusable"); + debug(`Setting the disabled attribute of element #${id}`); + element.disabled = true; + await expectAsyncExpression("axElement.isFocusable", "false"); + debug(""); + } The order of operations looks weird to me. I think it should be: 1. Check that an axElement is focusable. 2. Then focus it. 3. Disable the DOM element. 4. Check that now is not focusable. Not sure that we even have to do 2., because that's not what the test is testing, correct?
Tyler Wilcock
Comment 4
2022-01-14 14:16:23 PST
Created
attachment 449221
[details]
Patch
Tyler Wilcock
Comment 5
2022-01-14 14:17:30 PST
Thanks for the review -- addressed all of your comments in the latest patch.
Tyler Wilcock
Comment 6
2022-01-14 14:20:16 PST
(In reply to Andres Gonzalez from
comment #3
)
> (In reply to Tyler Wilcock from
comment #2
) > > Created
attachment 449207
[details]
> > Patch > > --- a/Source/WebCore/accessibility/AXObjectCache.cpp > +++ a/Source/WebCore/accessibility/AXObjectCache.cpp > > + case AXDisabledStateChanged: > + tree->updateNodeProperty(*notification.first, > AXPropertyName::CanSetFocusAttribute); > + break; > > Add this same case to the updateIsolatedTree that takes a single > notification as opposed to a vector of notifications.
We should refactor this such that we don't have to remember to add new notification handling in two places.
Tyler Wilcock
Comment 7
2022-01-14 15:25:56 PST
Created
attachment 449231
[details]
Patch
EWS
Comment 8
2022-01-15 09:24:33 PST
Committed
r288058
(
246078@main
): <
https://commits.webkit.org/246078@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 449231
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug