-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AX: Fix for multiple issues concerning <label> elements containing in…
…put 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
- Loading branch information
1 parent
5e5e744
commit 684b75a
Showing
11 changed files
with
171 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...form/glib/imported/w3c/web-platform-tests/accname/name/comp_embedded_control-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Tests the #comp_embedded_control portions of the AccName Name Computation algorithm. | ||
|
||
Flash the screen times | ||
|
||
Flash the screen times | ||
|
||
Flash the screen times | ||
|
||
Flash the screen times | ||
|
||
Flash the screen 3 times | ||
|
||
Flash the screen 3 times | ||
|
||
Flash the screen | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
times | ||
|
||
Flash the screen times | ||
|
||
Flash the screen times | ||
|
||
Flash the screen 3.0 times | ||
|
||
Flash the screen 3.0 times | ||
|
||
Flash the screen 3.0 times | ||
|
||
Flash the screen 3.0 times | ||
|
||
|
||
FAIL checkbox label with embedded textfield assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded textfield" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded textfield inside checkbox label | ||
FAIL checkbox label with embedded select:not([size]) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded select:not([size])" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded select:not([size]) inside checkbox label | ||
FAIL checkbox label with embedded select[size] assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded select[size]" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded select[size] inside checkbox label | ||
FAIL checkbox label with embedded combobox (input[type=text]) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (input[type=text])" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded combobox (input[type=text]) inside checkbox label | ||
FAIL checkbox label with embedded combobox (span) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (span)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded combobox (span) inside checkbox label | ||
FAIL checkbox label with embedded combobox (div) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded combobox (div)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded combobox (div) inside checkbox label | ||
FAIL checkbox label with embedded listbox>option[aria-selected=true] assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded listbox>option[aria-selected=true]" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded listbox>option[aria-selected=true] inside checkbox label | ||
FAIL checkbox label with embedded input[type=range] assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded input[type=range]" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded input[type=range] inside checkbox label | ||
FAIL checkbox label with embedded input[type=number] assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded input[type=number]" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded input[type=number] inside checkbox label | ||
FAIL checkbox label with embedded ARIA slider (aria-valuenow) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA slider (aria-valuenow)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded ARIA slider (aria-valuenow) inside checkbox label | ||
FAIL checkbox label with embedded ARIA slider (aria-valuetext) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA slider (aria-valuetext)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded ARIA slider (aria-valuetext) inside checkbox label | ||
FAIL checkbox label with embedded ARIA spinbutton (aria-valuenow) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA spinbutton (aria-valuenow)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded ARIA spinbutton (aria-valuenow) inside checkbox label | ||
FAIL checkbox label with embedded ARIA spinbutton (aria-valuetext) assert_equals: <input type="checkbox" data-expectedlabel="Flash the screen 3 times" data-testname="checkbox label with embedded ARIA spinbutton (aria-valuetext)" class="ex"> expected "Flash the screen 3 times" but got "Flash the screen number of times times" | ||
PASS label of embedded ARIA spinbutton (aria-valuetext) inside checkbox label | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.