[webkit-changes] [WebKit/WebKit] f4896f: AX: -[WebAccessibilityObjectWrapper attributedStri...

Tyler Wilcock noreply at github.com
Fri Aug 18 10:49:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f4896f6e7c4b65e4b93bf543e5c0c2620f2bc684
      https://github.com/WebKit/WebKit/commit/f4896f6e7c4b65e4b93bf543e5c0c2620f2bc684
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2023-08-18 (Fri, 18 Aug 2023)

  Changed paths:
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: -[WebAccessibilityObjectWrapper attributedStringForNSRange:] should exit early for ranges of zero length
https://bugs.webkit.org/show_bug.cgi?id=260055
rdar://113768013

Reviewed by Andres Gonzalez.

We should exit early if given a range of zero length because asking an object for its attributed string
of zero length does not make sense. Also, return `nil` instead of returning an empty attributed string,
since empty, non-nil attributed strings can cause issues for some assistive technologies.

* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper attributedStringForNSRange:]):

Canonical link: https://commits.webkit.org/267045@main




More information about the webkit-changes mailing list