Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(engine): rule engine refactor and update #2025

Merged
merged 73 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a23e4a8
Code clean up: separate CSSUtil #1974
shunguoy Aug 28, 2024
aa23df8
code cleanup: use ts classes instead of functions #1974
shunguoy Aug 28, 2024
5f93813
refactor the rule code #1974
shunguoy Aug 29, 2024
eeb7eb8
code refactor #1974
shunguoy Aug 30, 2024
0af1efc
code refactor for legacy #1974
shunguoy Aug 30, 2024
1d71d68
create NodeWalker #1974
shunguoy Sep 3, 2024
3b1c30a
refactor rules #1974
shunguoy Sep 9, 2024
cc0c87f
update the rules #1974
shunguoy Sep 10, 2024
87faf20
update the rule engine #1974
shunguoy Sep 10, 2024
18db1dc
add denug for testing #1974
shunguoy Sep 11, 2024
4e27b7b
add debug for testing #1974
shunguoy Sep 12, 2024
2d95642
clear up debug statement #1974
shunguoy Sep 12, 2024
8c513c7
update rules for resolved role #1974
shunguoy Sep 12, 2024
a74a077
update aria definition #1974
shunguoy Sep 12, 2024
521dfdb
update ethe resolvedRole in rules #1974
shunguoy Sep 13, 2024
9b56ace
refactor the rule aria_accessiblename_exists #1974
shunguoy Sep 13, 2024
75ab2a6
add console logs for debugging #1974
shunguoy Sep 13, 2024
6bf3ebd
update the rules #1974
shunguoy Sep 23, 2024
9d1c9a6
refactor isNodeVisible function #1974
shunguoy Sep 24, 2024
7ecf41c
refactor isNodeVisible #1974
shunguoy Sep 24, 2024
570140b
update the role calculation #1974
shunguoy Sep 24, 2024
8b54e0f
update the common util #1974
shunguoy Sep 24, 2024
0eb6a1d
update the aria path which contains presentation #1974
shunguoy Sep 25, 2024
8f27418
update accessible name calculation #1974
shunguoy Sep 26, 2024
041afb7
update the CommonUtil #1974
shunguoy Sep 30, 2024
75ef8e9
update svg and ariaautocomplete calculation #1974
shunguoy Oct 1, 2024
35d136b
update svg rule to use accNameUtil #1974
shunguoy Oct 1, 2024
65cd000
Update AccNameUtil #1974
shunguoy Oct 2, 2024
60ba7a2
update the rules for accessible name calculation #1974
shunguoy Oct 7, 2024
dfb92f0
update accName #1974
shunguoy Oct 7, 2024
2f05f62
update rules to use new Acc name calculation #1974
shunguoy Oct 8, 2024
866d234
update the rule for acc name #1974
shunguoy Oct 9, 2024
daf4473
update the rules to use new acc name calculation #1974
shunguoy Oct 11, 2024
823a48f
update the rules and test cases #1974
shunguoy Oct 21, 2024
3f8f276
update the rules to use accessible name calculation #1974
shunguoy Oct 22, 2024
84429bf
update the rules to use new accessible name #1974
shunguoy Oct 22, 2024
39a7cdd
Merge branch 'master' into dev-1974
shunguoy Oct 22, 2024
1976f5a
fix merge error #1974
shunguoy Oct 22, 2024
83d3815
fix the baselines #1974
shunguoy Oct 23, 2024
ab5dba4
update the selenium baselines #1974
shunguoy Oct 23, 2024
1915b30
Update JSONObjectStructureVerification.html.json
shunguoy Oct 23, 2024
257b361
Update JSONObjectStructureVerificationSelenium.html.json
shunguoy Oct 23, 2024
a7ba755
Update violations.json
shunguoy Oct 23, 2024
a10faa0
Update DOMWalker.ts
shunguoy Oct 23, 2024
712c8d2
fix the error "TypeError: Cannot read properties of null (reading 'no…
shunguoy Oct 24, 2024
ffee74b
Update label_name_visible.ts
shunguoy Oct 24, 2024
c51b995
update target spacing rule #1974
shunguoy Oct 25, 2024
796c3a8
update spaing rule #1974
shunguoy Oct 28, 2024
a19aa48
update DOMWalker #1974
shunguoy Oct 28, 2024
007d3f8
recalculate the inline text status #1974
shunguoy Oct 28, 2024
d73916d
update spacing rule and test results #1974
shunguoy Oct 29, 2024
404f4ba
Merge branch 'master' into dev-1974
shunguoy Oct 29, 2024
3950622
clean up the code #1974
shunguoy Oct 29, 2024
205a8bf
fix the baseline #1974
shunguoy Oct 29, 2024
d2ededb
update the baseline #1974
shunguoy Oct 29, 2024
61dbea8
update the baselines #1974
shunguoy Oct 29, 2024
3c26137
update puppeteer test skip file list #1974
shunguoy Oct 29, 2024
75aa8f2
update ignored test files #1974
shunguoy Oct 29, 2024
98aad61
skip 3 test files #1974
shunguoy Oct 29, 2024
613eedc
skip three test files in java test #1974
shunguoy Oct 29, 2024
b76c8ad
java test file update #1974
shunguoy Oct 29, 2024
50e83b5
Update AccessibilityCheckerSeleniumFFTest.java
shunguoy Oct 29, 2024
db30dfd
clean up the code #1974
shunguoy Oct 29, 2024
7a64cc6
remove util package from dependency #1974
shunguoy Nov 1, 2024
47c37d2
Fix wording typo #1974
shunguoy Nov 1, 2024
ef6f0dc
Protect from walking at the document level
tombrunet Nov 4, 2024
f647a45
Missing space
tombrunet Nov 4, 2024
2918ef8
update the test case #1974
shunguoy Nov 5, 2024
516ab45
Path fix?
tombrunet Nov 5, 2024
a1a5a10
Handle slot assignments better
tombrunet Nov 5, 2024
fddf257
Fix sibling accidentally entering slot
tombrunet Nov 6, 2024
50a20a3
Update the ARIA Walker
tombrunet Nov 6, 2024
77804fc
Kill hang
tombrunet Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ <h3 id="ruleMessage"></h3>

### Why is this important?

A `<label>` element is attached to a specific `<input>` element through the `for` attribute.
When a `<label>` does not reference the corresponding unique `id` in a valid `<input>` element,
A `<label>` element is attached to a specific element, such as `<input>` and `<select>`, through the `for` attribute.
When a `<label>` does not reference the corresponding unique `id` in a valid element,
assistive technologies cannot associate the label with the element.

<!-- This is where the code snippet is injected -->
<div id="locSnippet"></div>

### What to do

* Set the value of the `for` attribute to the `id` value of the valid `<input>` element to be labeled. Make sure the `id` value is unique.
* Set the value of the `for` attribute to the `id` value of the valid element to be labeled. Make sure the `id` value is unique.

For example:

Expand Down
4 changes: 3 additions & 1 deletion accessibility-checker-engine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
// { pattern: 'test/v2/checker/accessibility/rules/Rpt_Aria_RequiredParent_Native_Host_Sematics_ruleunit/ACT_ff89c9_pass4.html', watched: true },
//{ pattern: 'test/v2/checker/accessibility/rules/label_name_visible_ruleunit/label_offscreen.html', watched: true },
//{ pattern: 'test/v2/checker/accessibility/rules/aria_role_valid_ruleunit/td_attribute_invalid_copy.html', watched: true },
//{ pattern: 'test/v2/checker/accessibility/rules/label_name_visible_ruleunit/label_multiple_offscreen.html', watched: true },
//{ pattern: 'test/v2/checker/accessibility/rules/text_block_heading_ruleunit/Headings-noneUsedEmphasizedText.html', watched: true },
{ pattern: 'test/v2/checker/accessibility/rules/aria_parent_required_ruleunit/webComponentPass.html', watched: true },
{ pattern: 'test/v2/checker/accessibility/rules/aria_parent_required_ruleunit/webComponentPass2.html', watched: true },


{ pattern: 'test/**/*_ruleunit/*.html', watched: true },
Expand Down
10 changes: 5 additions & 5 deletions accessibility-checker-engine/src/v2/api/IEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ export { eGuidelineType as eRulesetType } from "../../v4/api/IGuideline";
/**
* @deprecated See ../../v4/api/IRule
*/
export let RulePass = RulePassNew;
export const RulePass = RulePassNew;

/**
* @deprecated See ../../v4/api/IRule
*/
export let RuleRender = RuleRenderNew;
export const RuleRender = RuleRenderNew;

/**
* @deprecated See ../../v4/api/IRule
*/
export let RuleFail = RuleFailNew;
export const RuleFail = RuleFailNew;

/**
* @deprecated See ../../v4/api/IRule
*/
export let RulePotential = RulePotentialNew;
export const RulePotential = RulePotentialNew;

/**
* @deprecated See ../../v4/api/IRule
*/
export let RuleManual = RuleManualNew;
export const RuleManual = RuleManualNew;

/**
* @deprecated See ../../v4/api/IRule
Expand Down
21 changes: 17 additions & 4 deletions accessibility-checker-engine/src/v2/aria/ARIADefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,19 @@ export class ARIADefinitions {
deprecatedProps: ['aria-disabled', 'aria-errormessage', 'aria-haspopup', 'aria-invalid']
},

"image": {
container: null,
props: null,
reqProps: null,
reqChildren: null,
htmlEquiv: "img",
roleType: "structure",
nameRequired: true,
nameFrom: ["author"],
presentationalChildren: true,
deprecatedProps: ['aria-disabled', 'aria-errormessage', 'aria-haspopup', 'aria-invalid']
},

"insertion": {
container: null,
props: null,
Expand Down Expand Up @@ -1801,7 +1814,7 @@ export class ARIADefinitions {
},
"button": {
implicitRole: ["button"],
validRoles: ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "slider", "switch", "tab", "treeitem"],
validRoles: ["checkbox", "combobox", "gridcell", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio","separator", "slider", "switch", "tab", "treeitem"],
globalAriaAttributesValid: true
},
"canvas": {
Expand Down Expand Up @@ -1914,7 +1927,7 @@ export class ARIADefinitions {
globalAriaAttributesValid: false
},
"hgroup": {
implicitRole: ["generic"],
implicitRole: ["group"],
validRoles: ["any"],
globalAriaAttributesValid: true
},
Expand Down Expand Up @@ -2839,14 +2852,14 @@ export class ARIADefinitions {
htmlAttributeValues: null
}]
},
"aria-autocomplete": {
/** "aria-autocomplete": {
conflict: [{
// conflict occurs if both exists, aria value is only for custom widget, rather than native
ariaAttributeValue: null,
htmlAttributeNames: ["autocomplete"],
htmlAttributeValues: null
}]
}
} */
}

static containers = []
Expand Down
Loading
Loading