[Webkit-unassigned] [Bug 233138] New: AX: Stop returning AccessibilityUIElements backed by a null pointer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 15 11:03:54 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=233138

            Bug ID: 233138
           Summary: AX: Stop returning AccessibilityUIElements backed by a
                    null pointer
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Accessibility
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tyler_w at apple.com
                CC: andresg_22 at apple.com,
                    webkit-bug-importer at group.apple.com

In a few places, we call AccessibilityUIElement::create() with a nullptr. This returns a Ref<> backed by a null pointer / object, which is confusing. We should probably return a null RefPtr instead.

One example:

Ref<AccessibilityUIElement> AccessibilityController::focusedElement()
{
     auto page = InjectedBundle::singleton().page()->page();
     auto root = static_cast<PlatformUIElement>(WKAccessibilityRootObject(page));
     auto rootElement = AccessibilityUIElement::create(root);
     if (auto focusedElement = rootElement->focusedElement())
         return *focusedElement;
     return AccessibilityUIElement::create(nullptr);
}

-- 
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/20211115/4b1cc1e6/attachment-0001.htm>


More information about the webkit-unassigned mailing list