WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-234119-20211210103740.patch (text/plain), 7.11 KB, created by
Sepand Parhami
on 2021-12-10 10:37:41 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sepand Parhami
Created:
2021-12-10 10:37:41 PST
Size:
7.11 KB
patch
obsolete
>Subversion Revision: 286738 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index c5d847ded4a3a75991bfd047ae364eac18229a9b..a4e99c1ff247c81475b846bf3fb680ae336cb60f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2021-12-09 Sepand Parhami <sparhami@apple.com> >+ >+ AX: Expose toggle buttons using role="button" as form controls. >+ https://bugs.webkit.org/show_bug.cgi?id=234119 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add the ToggleButton role to the list of aria controls in isARIAControl so that it >+ is a control when checked by the accessibility object search. >+ >+ Tests: LayoutTests/accessibility/mac/search-predicate-element-count.html >+ >+ * accessibility/AccessibilityNodeObject.cpp: >+ (WebCore::AccessibilityNodeObject::isLabelable const): >+ >+ Remove redundant check, isControl already covers it. >+ >+ * accessibility/AccessibilityObject.cpp: >+ (WebCore::AccessibilityObject::isARIAControl): >+ > 2021-12-08 Jer Noble <jer.noble@apple.com> > > [MSE] Add a Modules/mediasource/README.md file >diff --git a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >index 9fb83f249eeb0447f7c208d03cae17e918f29d7c..50a5a9f54b8bb5533b25908cb76d94be05f202cb 100644 >--- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >@@ -1289,7 +1289,7 @@ bool AccessibilityNodeObject::isLabelable() const > if (!node) > return false; > >- return is<HTMLInputElement>(*node) || AccessibilityObject::isARIAInput(ariaRoleAttribute()) || isControl() || isProgressIndicator() || isMeter(); >+ return is<HTMLInputElement>(*node) || isControl() || isProgressIndicator() || isMeter(); > } > > String AccessibilityNodeObject::textForLabelElement(Element* element) const >diff --git a/Source/WebCore/accessibility/AccessibilityObject.cpp b/Source/WebCore/accessibility/AccessibilityObject.cpp >index d649f1cd2cec7a8da6f04debe5524a770d09b9f5..4ad16cb3d54ed51f9d2b67115d2c584b16790719 100644 >--- a/Source/WebCore/accessibility/AccessibilityObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityObject.cpp >@@ -917,6 +917,7 @@ bool AccessibilityObject::isARIAControl(AccessibilityRole ariaRole) > case AccessibilityRole::PopUpButton: > case AccessibilityRole::Slider: > case AccessibilityRole::TextArea: >+ case AccessibilityRole::ToggleButton: > return true; > default: > return false; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 07cb198386a430b6324565331e07cd183719c50f..bc7a5b5f0bdee9d29778c8d38c01fd025c122306 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2021-12-09 Sepand Parhami <sparhami@apple.com> >+ >+ AX: Expose toggle buttons using role="button" as form controls. >+ https://bugs.webkit.org/show_bug.cgi?id=234119 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added a test case for button/role="button" with aria-presssed. Reordered a few things as >+ the previously named "inputs" section was not what was being checked in the test (it was >+ the number of buttons) and it had previously matched the number by coincidence. >+ >+ * accessibility/mac/search-predicate-element-count-expected.txt: >+ * accessibility/mac/search-predicate-element-count.html: >+ > 2021-12-08 Rob Buis <rbuis@igalia.com> > > [css-contain] Prevent various kinds of propagation to RenderView >diff --git a/LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt b/LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt >index 6a861e8334cbee3da3e62f9b1ff9a94fe1c93b79..8f690f48a03653a6af49d1845d1379266464eb87 100644 >--- a/LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt >+++ b/LayoutTests/accessibility/mac/search-predicate-element-count-expected.txt >@@ -6,8 +6,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > PASS tableCount is 2 > PASS linkCount is 3 > PASS imageCount is 4 >-PASS inputCount is 5 >-PASS controlCount is 12 >+PASS buttonCount is 7 >+PASS controlCount is 16 > PASS headingCount is 6 > PASS onscreenCount is 6 > PASS offscreenCount is 4 >diff --git a/LayoutTests/accessibility/mac/search-predicate-element-count.html b/LayoutTests/accessibility/mac/search-predicate-element-count.html >index 2a849b1e2608be4069a0f01b8355546c7a4c787e..bcd6b925ffcd0f58eea33c1d56b93410c314a2ff 100644 >--- a/LayoutTests/accessibility/mac/search-predicate-element-count.html >+++ b/LayoutTests/accessibility/mac/search-predicate-element-count.html >@@ -43,23 +43,29 @@ > <img alt="Cake" src="resources/cake.png"> > <img alt="Cake" src="resources/cake.png"> > <br> >-<!-- Inputs. --> >+ >+<!-- Buttons. --> > <input type="submit" value="Submit"> >+<button>Button</button> >+<div role="button">Role button</div> >+<!-- The following two are popup buttons. --> >+<button aria-haspopup="menu">Button with aria-haspopup</button> >+<div role="button" aria-haspopup="menu">Role button with aria-haspopup</div> >+<!-- The following two are toggle buttons. --> >+<button aria-pressed="false">Button with aria-pressed</button> >+<div role="button" aria-pressed="false">Role button with aria-pressed</div> >+<br> >+ >+<!-- Non-button controls. --> > <div role="checkbox">Role checkbox</div> > <div role="radio">Role radio</div> > <div role="searchbox">Role searchbox</div> > <div role="switch">Role switch</div> >-<br> >- >-<!-- Form controls. --> >-<button>Button</button> >-<div role="button">Role button</div> >+<div role="textbox">Role textbox</div> > <div role="combobox">Role combobox</div> >+<div role="listbox">Role listbox</div> > <div role="slider">Role slider</div> >-<div role="textbox">Role textbox</div> >-<!-- The following two are popup buttons and are also form controls. --> >-<button aria-haspopup="menu">Button with aria-haspopup</button> >-<div role="button" aria-haspopup="menu">Role button with aria-haspopup</div> >+<textarea>Textarea</textarea> > > </div> > >@@ -85,14 +91,14 @@ > // Images. > var imageCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXGraphicSearchKey", "", false); > shouldBe("imageCount", "4"); >- >- // Inputs. >- var inputCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false); >- shouldBe("inputCount", "5"); > >- // Form controls include inputs, so the count should be the sum of inputs and controls. >+ // Buttons. >+ var buttonCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXButtonSearchKey", "", false); >+ shouldBe("buttonCount", "7"); >+ >+ // Form controls include buttons, checkboxes, etc, so the count should be the sum of buttons and other controls. > var controlCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXControlSearchKey", "", false); >- shouldBe("controlCount", "12"); >+ shouldBe("controlCount", "16"); > > // Headings. > var headingCount = containerElement.uiElementCountForSearchPredicate(startElement, true, "AXHeadingSearchKey", "", false);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 234119
:
446654
| 446757