[webkit-changes] [WebKit/WebKit] 684b75: AX: Fix for multiple issues concerning <label> ele...

AndresGonzalezApple noreply at github.com
Thu Feb 22 08:40:56 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 684b75aed0f6532bb1948fcd235b6558dd70c9f7
      https://github.com/WebKit/WebKit/commit/684b75aed0f6532bb1948fcd235b6558dd70c9f7
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2024-02-22 (Thu, 22 Feb 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_embedded_control-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt
    A LayoutTests/platform/glib/imported/w3c/web-platform-tests/accname/name/comp_embedded_control-expected.txt
    M LayoutTests/platform/ios-simulator/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt
    M LayoutTests/platform/ios/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt
    R LayoutTests/platform/mac-ventura/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt
    M LayoutTests/platform/mac/accessibility/lists-expected.txt
    M Source/WebCore/accessibility/AccessibilityLabel.h
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityNodeObject.h
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp

  Log Message:
  -----------
  AX: Fix for multiple issues concerning <label> elements containing input elements.
https://bugs.webkit.org/show_bug.cgi?id=269607
<rdar://problem/123111075>

Reviewed by Tyler Wilcock.

This patch fixes ~20 test cases under:
    LayoutTests/imported/w3c/web-platform-tests/accname/name

We were failing to get the proper text for a <label> taht contains varios types of input fields, e.g., <label>some text<input type="text">more text</label>. This patch involves several fixes to obtain the proper stringValue for coboboxes, listboxes, list items, and an handling of the case described above in the method textAsLabelFor.

* LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_embedded_control-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt:
Changed the test cases from failing to passing.

* LayoutTests/platform/glib/imported/w3c/web-platform-tests/accname/name/comp_embedded_control-expected.txt: Added.
Added this file because the WPT tests that are now passing in COCOA are still failing in glib. This file is identical to the original expectation under the non-platform dir.

* LayoutTests/platform/ios-simulator/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt:
* LayoutTests/platform/mac-ventura/imported/w3c/web-platform-tests/accname/name/comp_host_language_label-expected.txt:
Removed, no longer needed since now the output is identical to non-platform specific expectation.

* LayoutTests/platform/mac/accessibility/lists-expected.txt:
* Source/WebCore/accessibility/AccessibilityLabel.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textAsLabelFor const):
(WebCore::AccessibilityNodeObject::textForLabelElements const):
(WebCore::appendNameToStringBuilder):
(WebCore::AccessibilityNodeObject::textUnderElement const):
(WebCore::AccessibilityNodeObject::stringValue const):
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForChildren const):
(WebCore::AccessibilityNodeObject::textAsLabel const): Renamed.
(WebCore::shouldAddSpaceBeforeAppendingNextElement): Deleted.
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::stringValue const):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list