Skip to content
Permalink
Browse files
AX: WebKit does not expose max/min value of <progress> element
https://bugs.webkit.org/show_bug.cgi?id=148707

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Allow native progress indicator elements to report min/max values by rewriting special
case code for ARIA progress bars.

Test: accessibility/mac/progress-element-min-max.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/mac/progress-element-min-max-expected.txt: Added.
* accessibility/mac/progress-element-min-max.html: Added.


Canonical link: https://commits.webkit.org/166836@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189258 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
fleizach committed Sep 2, 2015
1 parent 09630db commit e1cd99c7bb1f4adb10840607f07367445308039f
Showing 5 changed files with 68 additions and 2 deletions.
@@ -1,3 +1,13 @@
2015-09-02 Chris Fleizach <cfleizach@apple.com>

AX: WebKit does not expose max/min value of <progress> element
https://bugs.webkit.org/show_bug.cgi?id=148707

Reviewed by Mario Sanchez Prada.

* accessibility/mac/progress-element-min-max-expected.txt: Added.
* accessibility/mac/progress-element-min-max.html: Added.

2015-09-01 Dean Jackson <dino@apple.com>

[mediacontrols] Improve media controls testing helpers
@@ -0,0 +1,12 @@

This tests that the min/max values for a native progress element are exposed to the Mac platform.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS progress.maxValue is 75
PASS progress.minValue is 0
PASS successfullyParsed is true

TEST COMPLETE

@@ -0,0 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body id="body">

<progress id="progress" value="50" max="75">Foo</progress>

<p id="description"></p>
<div id="console"></div>

<script>

description("This tests that the min/max values for a native progress element are exposed to the Mac platform.");

if (window.accessibilityController) {

var progress = accessibilityController.accessibleElementById("progress");
shouldBe("progress.maxValue", "75");
// There's actually no min attribute for <progress> elements, so this is always zero.
shouldBe("progress.minValue", "0");
}

</script>

<script src="../../resources/js-test-post.js"></script>
</body>
</html>
@@ -1,3 +1,18 @@
2015-09-02 Chris Fleizach <cfleizach@apple.com>

AX: WebKit does not expose max/min value of <progress> element
https://bugs.webkit.org/show_bug.cgi?id=148707

Reviewed by Mario Sanchez Prada.

Allow native progress indicator elements to report min/max values by rewriting special
case code for ARIA progress bars.

Test: accessibility/mac/progress-element-min-max.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

2015-09-02 Hyemi Shin <hyemi.sin@samsung.com>

[GStreamer] Simplify linking pads in AudioDestination and correct old comment.
@@ -2571,14 +2571,14 @@ - (id)accessibilityAttributeValue:(NSString*)attributeName

if ([attributeName isEqualToString: NSAccessibilityMinValueAttribute]) {
// Indeterminate progress indicator should return 0.
if (m_object->isProgressIndicator() && !m_object->hasAttribute(aria_valuenowAttr))
if (m_object->ariaRoleAttribute() == ProgressIndicatorRole && !m_object->hasAttribute(aria_valuenowAttr))
return @0;
return [NSNumber numberWithFloat:m_object->minValueForRange()];
}

if ([attributeName isEqualToString: NSAccessibilityMaxValueAttribute]) {
// Indeterminate progress indicator should return 0.
if (m_object->isProgressIndicator() && !m_object->hasAttribute(aria_valuenowAttr))
if (m_object->ariaRoleAttribute() == ProgressIndicatorRole && !m_object->hasAttribute(aria_valuenowAttr))
return @0;
return [NSNumber numberWithFloat:m_object->maxValueForRange()];
}

0 comments on commit e1cd99c

Please sign in to comment.