[Webkit-unassigned] [Bug 231914] AX: Any addition of children should funnel through AccessibilityObject::addChild
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 19 07:58:32 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=231914
--- Comment #5 from Andres Gonzalez <andresg_22 at apple.com> ---
(In reply to Andres Gonzalez from comment #4)
> (In reply to Tyler Wilcock from comment #3)
> > Created attachment 441675 [details]
> > Patch
>
> --- a/Source/WebCore/accessibility/AccessibilityObject.cpp
> +++ a/Source/WebCore/accessibility/AccessibilityObject.cpp
>
> - ASSERT(child->parentObject() == this);
> +#ifndef NDEBUG
> + // Autofill buttons are dynamically created elements by WebKit, and
> aren't assigned as a child
> + // to their proper DOM parent (see
> TextFieldInputType::createAutoFillButton), so exclude them from this ASSERT.
> + // Table component child-parent relationships also often doesn't
> line up properly, hence the need for methods
> + // like parentTable() and parentRow(). Exclude them from this
> ASSERT too.
> + if (!isAutofillButton(*this) && !isTableComponent(*child) &&
> !isTableComponent(*this))
> + ASSERT(child->parentObject() == this);
> +#endif
>
> I'm not convinced we should special case this sanity check. The child-parent
> relationship of the corresponding DOM elements may not match the AX
> hierarchy, but the AX hierarchy should be consistent with itself in all
> cases. I.e., if we expose child as a child of parent, then
> child->parentObject() should be parent.
Perhaps part of the problem is that parentObject() is returning the parent based on the DOM hierarchy and not on the AX hierarchy?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211019/5d1f0335/attachment.htm>
More information about the webkit-unassigned
mailing list