[webkit-changes] [WebKit/WebKit] b6dc2f: Accessibility is not informed of changes to severa...
Tyler Wilcock
noreply at github.com
Fri Apr 14 14:01:35 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b6dc2fc14af457482b09b9408bd8aa676d110bb4
https://github.com/WebKit/WebKit/commit/b6dc2fc14af457482b09b9408bd8aa676d110bb4
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
Log Message:
-----------
Accessibility is not informed of changes to several attributes
https://bugs.webkit.org/show_bug.cgi?id=255433
rdar://problem/108030716
Reviewed by Chris Dumez.
Accessibility relies on attribute changes from the DOM to stay up to date, and we are missing quite a few.
This is because accessibility is notified about attribute changes in Element::attributeChanged. However,
this method is virtual, and many subclasses don't call up to Element::attributeChanged. I believe we've
always had this problem for some attributes, but it was worsened with the restructuring in this change:
https://bugs.webkit.org/show_bug.cgi?id=255258 (Drop Element::parseAttribute())
After this change, we stopped receiving updates for the disabled attribute for option elements, the
placeholder attribute for HTMLTextFormControlElement subclasses, and likely more.
This was caught because accessibility/dynamic-attribute-changes-should-update-isenabled.html started failing
in isolated tree mode (--accessibility-isolated-tree test runner flag). This configuration is not in EWS
(post-commit only for now), so this bug couldn't have been caught up-front.
This is performance neutral on Speedometer.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::notifyAttributeChanged):
Added. Calls the virtual attributeChanged method and unconditionally
notifies accessibility of the change.
(WebCore::Element::attributeChanged):
(WebCore::Element::parserSetAttributes):
(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::didAddAttribute):
(WebCore::Element::didModifyAttribute):
(WebCore::Element::didRemoveAttribute):
(WebCore::Element::cloneAttributesFromElement):
Use notifyAttributeChanged over attributeChanged.
Canonical link: https://commits.webkit.org/262988@main
More information about the webkit-changes
mailing list