Changeset 288100 in webkit
- Timestamp:
- Jan 17, 2022 11:50:14 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt (modified) (1 diff)
-
LayoutTests/accessibility/mac/search-predicate-element-count.html (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityNodeObject.cpp (modified) (1 diff)
-
Source/WebCore/accessibility/AccessibilityObject.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r288099 r288100 1 2022-01-17 Sepand Parhami <sparhami@apple.com> 2 3 AX: Expose toggle buttons using role="button" as form controls. 4 https://bugs.webkit.org/show_bug.cgi?id=234119 5 6 Reviewed by Chris Fleizach. 7 8 Added a test case for button/role="button" with aria-presssed. Reordered a few things as 9 the previously named "inputs" section was not what was being checked in the test (it was 10 the number of buttons) and it had previously matched the number by coincidence. 11 12 * accessibility/mac/search-predicate-element-count-expected.txt: 13 * accessibility/mac/search-predicate-element-count.html: 14 1 15 2022-01-17 Antti Koivisto <antti@apple.com> 2 16 -
trunk/LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt
r266207 r288100 7 7 PASS linkCount is 3 8 8 PASS imageCount is 4 9 PASS inputCount is 510 PASS controlCount is 1 29 PASS buttonCount is 7 10 PASS controlCount is 16 11 11 PASS headingCount is 6 12 12 PASS onscreenCount is 6 -
trunk/LayoutTests/accessibility/mac/search-predicate-element-count.html
r266207 r288100 44 44 <img alt="Cake" src="resources/cake.png"> 45 45 <br> 46 <!-- Inputs. --> 46 47 <!-- Buttons. --> 47 48 <input type="submit" value="Submit"> 49 <button>Button</button> 50 <div role="button">Role button</div> 51 <!-- The following two are popup buttons. --> 52 <button aria-haspopup="menu">Button with aria-haspopup</button> 53 <div role="button" aria-haspopup="menu">Role button with aria-haspopup</div> 54 <!-- The following two are toggle buttons. --> 55 <button aria-pressed="false">Button with aria-pressed</button> 56 <div role="button" aria-pressed="false">Role button with aria-pressed</div> 57 <br> 58 59 <!-- Non-button controls. --> 48 60 <div role="checkbox">Role checkbox</div> 49 61 <div role="radio">Role radio</div> 50 62 <div role="searchbox">Role searchbox</div> 51 63 <div role="switch">Role switch</div> 52 <br> 53 54 <!-- Form controls. --> 55 <button>Button</button> 56 <div role="button">Role button</div> 64 <div role="textbox">Role textbox</div> 57 65 <div role="combobox">Role combobox</div> 66 <div role="listbox">Role listbox</div> 58 67 <div role="slider">Role slider</div> 59 <div role="textbox">Role textbox</div> 60 <!-- The following two are popup buttons and are also form controls. --> 61 <button aria-haspopup="menu">Button with aria-haspopup</button> 62 <div role="button" aria-haspopup="menu">Role button with aria-haspopup</div> 68 <textarea>Textarea</textarea> 63 69 64 70 </div> … … 86 92 var imageCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false); 87 93 shouldBe("imageCount", "4"); 88 89 // Inputs.90 var inputCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false);91 shouldBe("inputCount", "5");92 94 93 // Form controls include inputs, so the count should be the sum of inputs and controls. 95 // Buttons. 96 var buttonCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false); 97 shouldBe("buttonCount", "7"); 98 99 // Form controls include buttons, checkboxes, etc, so the count should be the sum of buttons and other controls. 94 100 var controlCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXControlSearchKey", "", false); 95 shouldBe("controlCount", "1 2");101 shouldBe("controlCount", "16"); 96 102 97 103 // Headings. -
trunk/Source/WebCore/ChangeLog
r288099 r288100 1 2022-01-17 Sepand Parhami <sparhami@apple.com> 2 3 AX: Expose toggle buttons using role="button" as form controls. 4 https://bugs.webkit.org/show_bug.cgi?id=234119 5 6 Reviewed by Chris Fleizach. 7 8 Add the ToggleButton role to the list of aria controls in isARIAControl so that it 9 is a control when checked by the accessibility object search. 10 11 Tests: LayoutTests/accessibility/mac/search-predicate-element-count.html 12 13 * accessibility/AccessibilityNodeObject.cpp: 14 (WebCore::AccessibilityNodeObject::isLabelable const): 15 16 Remove redundant check, isControl already covers it. 17 18 * accessibility/AccessibilityObject.cpp: 19 (WebCore::AccessibilityObject::isARIAControl): 20 1 21 2022-01-17 Antti Koivisto <antti@apple.com> 2 22 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r288018 r288100 1329 1329 return false; 1330 1330 1331 return is<HTMLInputElement>(*node) || AccessibilityObject::isARIAInput(ariaRoleAttribute()) ||isControl() || isProgressIndicator() || isMeter();1331 return is<HTMLInputElement>(*node) || isControl() || isProgressIndicator() || isMeter(); 1332 1332 } 1333 1333 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r288027 r288100 930 930 case AccessibilityRole::Slider: 931 931 case AccessibilityRole::TextArea: 932 case AccessibilityRole::ToggleButton: 932 933 return true; 933 934 default:
Note: See TracChangeset
for help on using the changeset viewer.