Skip to content

Commit

Permalink
Revert "Reland "Do not expose aria-errormessage when aria-invalid is …
Browse files Browse the repository at this point in the history
…false""

This reverts commit ebd839c.

Reason for revert: Fails
All/DumpAccessibilityTreeTest.AccessibilityAriaErrorMessage/linux
test
on linux-xenial-rel.

Example failure:
https://ci.chromium.org/ui/p/chromium/builders/ci/linux-xenial-rel/12274/overview

Original change's description:
> Reland "Do not expose aria-errormessage when aria-invalid is false"
>
> This is a reland of commit 5b6bfaa.
>
> It also adds the ability to have specific expectations files for
> Trusty in the content browser tests.
>
> The reason the change was reverted is that Trusty runs a much older
> version of ATK which does not support the ATK relation types used
> for aria-errormessage. There are quite a few other things that are
> not supported in the runtime version of ATK on Trusty. Thus having
> Trusty-specific expectations will give us the ability to test more
> things via content browser tests and using fewer workarounds.
>
> Original change's description:
> > Do not expose aria-errormessage when aria-invalid is false
> >
> > ARIA 1.2 added the following requirement:
> >
> >   User agents MUST NOT expose aria-errormessage for an object with an
> >   aria-invalid value of false.
> >
> > We were exposing it unconditionally. This commit fixes that.
> >
> > AX-Relnotes: Implement ARIA 1.2 requirement to not expose
> > aria-errormessage when aria-invalid is false.
> >
> > Bug: 1233978
> >
> > Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel
> > Change-Id: I9cc8e654ea22919c105e331d88fd69d49990494c
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3062841
> > Reviewed-by: Nektarios Paisios <nektar@chromium.org>
> > Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
> > Cr-Commit-Position: refs/heads/master@{#907136}
>
> Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel,linux-trusty-rel
> Change-Id: I426b47a440cd28a687b272227bcb95239cb5f6e9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3065525
> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
> Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
> Cr-Commit-Position: refs/heads/master@{#908653}

Change-Id: I6de352cade74ac101fe9e094d88c9793777e2226
Cq-Include-Trybots: luci.chromium.try:linux-blink-web-tests-force-accessibility-rel,linux-trusty-rel
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3070782
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Owners-Override: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#908703}
  • Loading branch information
Alexey Baskakov authored and Chromium LUCI CQ committed Aug 5, 2021
1 parent c2af794 commit 242c3fe
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 74 deletions.
13 changes: 0 additions & 13 deletions content/public/test/dump_accessibility_test_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#if defined(OS_WIN)
#include "base/win/windows_version.h"
#elif BUILDFLAG(USE_ATK)
#include <dlfcn.h>
#endif

namespace content {
Expand Down Expand Up @@ -333,17 +331,6 @@ DumpAccessibilityTestHelper::GetVersionSpecificExpectedFileSuffix(
suffix = FILE_PATH_LITERAL("-") + expectations_qualifier;
return suffix + FILE_PATH_LITERAL("-expected-uia-win7.txt");
}
#elif BUILDFLAG(USE_ATK)
// On the Trusty bot, the ATK version at compile time is much newer than the
// runtime version. AtkTableCell was added in 2.12, Trusty runs 2.10. So use
// the absence of this API as a runtime means to identify Trusty.
if (expectation_type_ == "linux" &&
!dlsym(RTLD_DEFAULT, "atk_table_cell_get_type")) {
FilePath::StringType suffix;
if (!expectations_qualifier.empty())
suffix = FILE_PATH_LITERAL("-") + expectations_qualifier;
return suffix + FILE_PATH_LITERAL("-expected-auralinux-trusty.txt");
}
#endif
return FILE_PATH_LITERAL("");
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@ rootWebArea
++genericContainer ignored
++++genericContainer ignored
++++++genericContainer
++++++++textField name='Invalid is true' errormessageId=paragraph invalidState=true
++++++++textField errormessageId=paragraph invalidState=true
++++++++++genericContainer
++++++++textField name='Invalid is false'
++++++++++genericContainer
++++++++textField name='Invalid is not set'
++++++++++genericContainer
++++++paragraph
++++++++staticText name='Error for invalid input'
++++++++++inlineTextBox name='Error for invalid input'
++++++paragraph
++++++++staticText name='Error for input which is not invalid'
++++++++++inlineTextBox name='Error for input which is not invalid'
++++++paragraph
++++++++staticText name='Error for input with invalid not set'
++++++++++inlineTextBox name='Error for input with invalid not set'
++++++++staticText name='Error'
++++++++++inlineTextBox name='Error'
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE n_relations=0
++IA2_ROLE_SECTION n_relations=0
++++ROLE_SYSTEM_TEXT name='Invalid is true' FOCUSABLE IA2_STATE_INVALID_ENTRY n_relations=1
++++ROLE_SYSTEM_TEXT name='Invalid is false' FOCUSABLE n_relations=0
++++ROLE_SYSTEM_TEXT name='Invalid is not set' FOCUSABLE n_relations=0
++++ROLE_SYSTEM_TEXT FOCUSABLE IA2_STATE_INVALID_ENTRY n_relations=1
++IA2_ROLE_PARAGRAPH n_relations=1
++++ROLE_SYSTEM_STATICTEXT name='Error for invalid input' n_relations=0
++IA2_ROLE_PARAGRAPH n_relations=0
++++ROLE_SYSTEM_STATICTEXT name='Error for input which is not invalid' n_relations=0
++IA2_ROLE_PARAGRAPH n_relations=0
++++ROLE_SYSTEM_STATICTEXT name='Error for input with invalid not set' n_relations=0
++++ROLE_SYSTEM_STATICTEXT name='Error' n_relations=0
9 changes: 2 additions & 7 deletions content/test/data/accessibility/aria/aria-errormessage.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
<!--
@AURALINUX-DENY:selectable-text*
@BLINK-ALLOW:error*
@WIN-ALLOW:n_relations*
-->
<!DOCTYPE html>
<html>
<body>
<div>
<input aria-label="Invalid is true" aria-invalid="true" aria-errormessage="error1">
<input aria-label="Invalid is false" aria-invalid="false" aria-errormessage="error2">
<input aria-label="Invalid is not set" aria-errormessage="error3">
<input aria-invalid="true" aria-errormessage="error">
</div>
<p id="error1">Error for invalid input</p>
<p id="error2">Error for input which is not invalid</p>
<p id="error3">Error for input with invalid not set</p>
<p id="error">Error</p>
</body>
</html>
1 change: 0 additions & 1 deletion content/test/data/accessibility/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ out/Default/browser_tests --gtest_filter="PDFExtensionAccessibilityTreeDumpTest*
Supported platforms are:
* `android` -- expected Android AccessibilityNodeInfo output
* `auralinux` -- expected Linux ATK output
* `auralinux-trusty` -- expected Linux ATK output (Version Specific Expected File)
* `blink` -- representation of internal accessibility tree
* `mac` -- expected Mac NSAccessibility output
* `win` -- expected Win IAccessible/IAccessible2 output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ TEST_F(AccessibilityObjectModelTest, SparseAttributes) {
aria-virtualcontent=block-end
aria-activedescendant=active
aria-details=details
aria-invalid=true
aria-errormessage=error>
<div id=active role=option></div>
<div id=active2 role=gridcell></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4480,9 +4480,6 @@ void AXNodeObject::HandleActiveDescendantChanged() {
}

AXObject* AXNodeObject::ErrorMessage() const {
if (GetInvalidState() == ax::mojom::blink::InvalidState::kFalse)
return nullptr;

// Check for aria-errormessage.
Element* existing_error_message =
GetAOMPropertyOrARIAAttribute(AOMRelationProperty::kErrorMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ void SetObjectAttribute(ax::mojom::blink::IntAttribute attribute,
!ax_target->IsVisible()) {
return;
}
if (attribute == ax::mojom::blink::IntAttribute::kErrormessageId &&
object->GetInvalidState() == ax::mojom::blink::InvalidState::kFalse) {
return;
}

node_data->AddIntAttribute(attribute, ax_target->AXObjectID());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Tests ARIA 1.1 accessibility markup.
name : invalid
value : {
type : token
value : true
value : false
}
}
[1] : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(async function(testRunner) {
var {page, session, dp} = await testRunner.startHTML(`
<input data-dump aria-errormessage='err' aria-invalid='true'>
<input data-dump aria-errormessage='err'>
<h3 id='err'>This text field has an error!</h3>
<img data-dump aria-details='d' aria-label='Label'>
Expand Down

0 comments on commit 242c3fe

Please sign in to comment.