WebKit Bugzilla
Attachment 360933 Details for
Bug 173497
: AX: VoiceOver can change the value of disabled sliders
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-173497-20190201194603.patch (text/plain), 4.03 KB, created by
Eric Liang
on 2019-02-01 17:46:04 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Eric Liang
Created:
2019-02-01 17:46:04 PST
Size:
4.03 KB
patch
obsolete
>Subversion Revision: 240875 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5723d7dd2be570f5eefcbfe31c3733600de74546..17343a792c240ca99539fd3c8efa396df1d44af9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-01 Eric Liang <ericliang@apple.com> >+ >+ When performing Increment or Decrement on sliders, check to see if the slider is disabled. >+ https://bugs.webkit.org/show_bug.cgi?id=173497 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: accessibility/set-value-not-work-for-disabled-sliders.html >+ >+ * accessibility/AccessibilityNodeObject.cpp: >+ (WebCore::AccessibilityNodeObject::alterSliderValue): >+ > 2019-02-01 Antoine Quint <graouts@apple.com> > > Dispatch pointercancel events when content is panned or zoomed on iOS >diff --git a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >index 8b7d6e6ffa15545cda1b45c6177c267916713b0d..15bcb02e64c6b8232571df3c2c48fe0fb1551610 100644 >--- a/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityNodeObject.cpp >@@ -1063,6 +1063,10 @@ void AccessibilityNodeObject::alterSliderValue(bool increase) > { > if (roleValue() != AccessibilityRole::Slider) > return; >+ >+ auto element = this->element(); >+ if (!element || element->isDisabledFormControl()) >+ return; > > if (!getAttribute(stepAttr).isEmpty()) > changeValueByStep(increase); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 395610b7ad685471edb317b14b82467a1fea5b41..7ad2d775ac7c57209de215c41f7425647eab7ab0 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-01 Eric Liang <ericliang@apple.com> >+ >+ Check if slider value changed after calling AX Increment or Decrement on disabled sliders. >+ https://bugs.webkit.org/show_bug.cgi?id=193497 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/set-value-not-work-for-disabled-sliders.html: Added. >+ > 2019-02-01 Antoine Quint <graouts@apple.com> > > Dispatch pointercancel events when content is panned or zoomed on iOS >diff --git a/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html b/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bfe45eedca65f475c9e37520bbea5dc14edae806 >--- /dev/null >+++ b/LayoutTests/accessibility/set-value-not-work-for-disabled-sliders.html >@@ -0,0 +1,42 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<script src="../resources/js-test-pre.js"></script> >+</head> >+<body id="body"> >+<div id="content"> >+ >+<input id="test0" type='range' should-change="false" disabled> >+<input id="test1" type='range' should-change="false" disabled aria-disabled="true"> >+<input id="test2" type='range' should-change="false" disabled aria-disabled="false"> >+<input id="test3" type='range' should-change="true" > >+<input id="test4" type='range' should-change="true" aria-disabled="true"> >+<input id="test5" type='range' should-change="true" aria-disabled="false"> >+ >+<p id="description"></p> >+<div id="console"></div> >+ >+</div> >+<script> >+ description("This tests that disabled sliders can't be incremented or decremented."); >+ >+ if (window.accessibilityController) { >+ var numOfTests = 6; >+ for (var testId = 0; testId < numOfTests; testId++) { >+ var slider = accessibilityController.accessibleElementById("test" + testId); >+ var shouldChange = document.getElementById("test" + testId).getAttribute("should-change") == "true" ? true : false; >+ shouldBe("slider.intValue", "50"); >+ >+ slider.increment(); >+ shouldBe("slider.intValue", shouldChange ? "55" : "50"); >+ >+ slider.decrement(); >+ slider.decrement(); >+ shouldBe("slider.intValue", shouldChange ? "45" : "50"); >+ } >+ } >+</script> >+ >+<script src="../resources/js-test-post.js"></script> >+</body> >+</html>
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 173497
:
313148
|
360928
|
360933
|
361076