From 94252233c4b6fd3425a10abce661a9a2425a981f Mon Sep 17 00:00:00 2001 From: Shunguo Date: Tue, 16 Jan 2024 09:54:43 -0600 Subject: [PATCH 1/6] update aria definition #1518 --- .../src/v2/aria/ARIADefinitions.ts | 4 +- .../deletion_attribute.html | 325 ++++++++++++++++++ .../deletion_role.html | 324 +++++++++++++++++ 3 files changed, 651 insertions(+), 2 deletions(-) create mode 100755 accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html create mode 100755 accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_role_redundant_ruleunit/deletion_role.html diff --git a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts index 6d622f8c9..59cd8b0bd 100644 --- a/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts +++ b/accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts @@ -2120,10 +2120,10 @@ export class ARIADefinitions { globalAriaAttributesValid: true }, "s": { - implicitRole: null, + implicitRole: ["deletion"], validRoles: ["any"], globalAriaAttributesValid: true, - prohibitedAriaAttributesWhenNoImplicitRole: ["aria-label", "aria-labelledby"] + otherDisallowedAriaAttributes: ["aria-label", "aria-labelledby"] }, "samp": { implicitRole: ["generic"], diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html new file mode 100755 index 000000000..44e5160aa --- /dev/null +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html @@ -0,0 +1,325 @@ + + + + + + +element role deletion + + + +

There will be 15 tickets available at the box office tonight.

+

Tickets are sold out quickly, buy soon.

+ +

Please Check Later!

+ + + + diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_role_redundant_ruleunit/deletion_role.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_role_redundant_ruleunit/deletion_role.html new file mode 100755 index 000000000..fa42dbfce --- /dev/null +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_role_redundant_ruleunit/deletion_role.html @@ -0,0 +1,324 @@ + + + + + + +element role deletion + + + +

There will be 15 tickets available at the box office tonight.

+ +

Please Check Later!

+ + + + From 5b5e74f44f557d7e29c6dee3c3af0934d8863748 Mon Sep 17 00:00:00 2001 From: Shunguo Date: Tue, 16 Jan 2024 10:37:40 -0600 Subject: [PATCH 2/6] update test cases for the S element #1518 --- .../deletion_attribute.html | 283 +----------------- .../deletion_role.html | 278 +---------------- 2 files changed, 13 insertions(+), 548 deletions(-) diff --git a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html index 44e5160aa..2a33f7d21 100755 --- a/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html +++ b/accessibility-checker-engine/test/v2/checker/accessibility/rules/aria_attribute_valid_ruleunit/deletion_attribute.html @@ -17,7 +17,7 @@ *****************************************************************************/ --> - + element role deletion @@ -37,284 +37,15 @@ "ruleId": "aria_role_redundant", "value": [ "INFORMATION", - "FAIL" + "PASS" ], "path": { - "dom": "/html[1]", - "aria": "/document[1]" + "dom": "/html[1]/body[1]/p[2]/s[1]", + "aria": "/document[1]/paragraph[2]/alert[1]" }, - "reasonId": "fail_redundant", - "message": "The explicitly-assigned ARIA role \"document\" is redundant with the implicit role of the element ", - "messageArgs": [ - "document", - "html" - ], - "apiArgs": [], - "category": "Accessibility" - }, - { - "ruleId": "aria_role_redundant", - "value": [ - "INFORMATION", - "FAIL" - ], - "path": { - "dom": "/html[1]/body[1]/button[1]", - "aria": "/document[1]/button[1]" - }, - "reasonId": "fail_redundant", - "message": "The explicitly-assigned ARIA role \"button\" is redundant with the implicit role of the element