From 68c5b8e3fe7016bf065a0e2c0d4385515a3fcabc Mon Sep 17 00:00:00 2001 From: Shunguo Yan Date: Thu, 20 Apr 2023 10:22:43 -0500 Subject: [PATCH 1/2] update rule and test case #1336 --- .../src/v2/aria/ARIADefinitions.ts | 1 + .../body_attribute.html | 40 ++++++++++++++++++ .../section copy.html | 42 ------------------- 3 files changed, 41 insertions(+), 42 deletions(-) create mode 100644 accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/body_attribute.html delete mode 100644 accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/section copy.html diff --git a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts index c8b040852..47eedf466 100644 --- a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts +++ b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts @@ -1710,6 +1710,7 @@ export class ARIADefinitions { "body": { implicitRole: ["generic"], validRoles: null, + otherDisallowedAriaAttributes: ['aria-hidden'], globalAriaAttributesValid: true }, "br": { diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/body_attribute.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/body_attribute.html new file mode 100644 index 000000000..618f45fc2 --- /dev/null +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/body_attribute.html @@ -0,0 +1,40 @@ + + + + Sandbox + + + + +
+

Test page

+
+ + + diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/section copy.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/section copy.html deleted file mode 100644 index 2be030999..000000000 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/section copy.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Sandbox - - - - -
-

Test page

-
- Hello -
-
- - - From 602a5adba0d83712926e0184d03bb42f077d0310 Mon Sep 17 00:00:00 2001 From: Shunguo Yan Date: Thu, 20 Apr 2023 14:54:07 -0500 Subject: [PATCH 2/2] add search element support #1336 --- .../src/v2/aria/ARIADefinitions.ts | 5 + .../search_role_attribute.html | 175 ++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/search_role_attribute.html diff --git a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts index 47eedf466..d685f2d26 100644 --- a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts +++ b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts @@ -2052,6 +2052,11 @@ export class ARIADefinitions { validRoles: null, globalAriaAttributesValid: false }, + "search": { + implicitRole: ['search'], + validRoles: ['search', 'form', 'group', 'none', 'presentation', 'region'], + globalAriaAttributesValid: true + }, "slot": { implicitRole: null, validRoles: null, diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/search_role_attribute.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/search_role_attribute.html new file mode 100644 index 000000000..ad35b39c8 --- /dev/null +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_semantics_role_ruleunit/search_role_attribute.html @@ -0,0 +1,175 @@ + + + + Sandbox + + + + +
+ + + + + + + + +
+ + +