Commit d51019c1 authored by cfleizach@apple.com's avatar cfleizach@apple.com

WebKit does not expose AXPlaceholder value on password fields

https://bugs.webkit.org/show_bug.cgi?id=68745

Reviewed by Oliver Hunt.

Source/WebCore: 

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

LayoutTests: 

* accessibility/placeholder-expected.txt:
* accessibility/placeholder.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 87fa5eaa
2011-09-23 Chris Fleizach <cfleizach@apple.com>
WebKit does not expose AXPlaceholder value on password fields
https://bugs.webkit.org/show_bug.cgi?id=68745
Reviewed by Oliver Hunt.
* accessibility/placeholder-expected.txt:
* accessibility/placeholder.html:
2011-09-23 Justin Novosad <junov@chromium.org> 2011-09-23 Justin Novosad <junov@chromium.org>
Unwarranted DOM Exception when canvas2D drawImage is called with src Unwarranted DOM Exception when canvas2D drawImage is called with src
This test makes sure that the placeholder is returned as the correct attribute This test makes sure that the placeholder is returned as the correct attribute
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS fieldElement.stringAttributeValue('AXPlaceholderValue') is 'search' PASS fieldElement.stringAttributeValue('AXPlaceholderValue') is 'search'
PASS pass.stringAttributeValue('AXPlaceholderValue') is 'Password'
PASS successfullyParsed is true PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
......
...@@ -10,6 +10,8 @@ var successfullyParsed = false; ...@@ -10,6 +10,8 @@ var successfullyParsed = false;
<body id="body"> <body id="body">
<input placeholder="search" type="text" name="q" size="15" maxlength="255" id="searchterm" /> <input placeholder="search" type="text" name="q" size="15" maxlength="255" id="searchterm" />
<input id="password" class="field" type="password" name="sc1798" value="" placeholder="Password" spellcheck="true" maxlength="5096">
<p id="description"></p> <p id="description"></p>
<div id="console"></div> <div id="console"></div>
...@@ -22,6 +24,10 @@ var successfullyParsed = false; ...@@ -22,6 +24,10 @@ var successfullyParsed = false;
var fieldElement = accessibilityController.focusedElement; var fieldElement = accessibilityController.focusedElement;
shouldBe("fieldElement.stringAttributeValue('AXPlaceholderValue')", "'search'"); shouldBe("fieldElement.stringAttributeValue('AXPlaceholderValue')", "'search'");
document.getElementById("password").focus();
var pass = accessibilityController.focusedElement;
shouldBe("pass.stringAttributeValue('AXPlaceholderValue')", "'Password'");
} }
successfullyParsed = true; successfullyParsed = true;
</script> </script>
......
2011-09-23 Chris Fleizach <cfleizach@apple.com>
WebKit does not expose AXPlaceholder value on password fields
https://bugs.webkit.org/show_bug.cgi?id=68745
Reviewed by Oliver Hunt.
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2011-09-23 Mark Rowe <mrowe@apple.com> 2011-09-23 Mark Rowe <mrowe@apple.com>
Fix the build. Fix the build.
...@@ -1196,6 +1196,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit ...@@ -1196,6 +1196,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit
[tempArray addObject:NSAccessibilityTitleUIElementAttribute]; [tempArray addObject:NSAccessibilityTitleUIElementAttribute];
[tempArray addObject:NSAccessibilityRequiredAttribute]; [tempArray addObject:NSAccessibilityRequiredAttribute];
[tempArray addObject:NSAccessibilityInvalidAttribute]; [tempArray addObject:NSAccessibilityInvalidAttribute];
[tempArray addObject:NSAccessibilityPlaceholderValueAttribute];
passwordFieldAttrs = [[NSArray alloc] initWithArray:tempArray]; passwordFieldAttrs = [[NSArray alloc] initWithArray:tempArray];
[tempArray release]; [tempArray release];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment