Skip to content

Commit

Permalink
chore(rules): fix section508 tags
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Mar 12, 2024
1 parent 269fc3f commit 430f359
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 114 deletions.
2 changes: 1 addition & 1 deletion kayle/builder/htmlcs-rule-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const htmlcsRuleMap = (rule: ParamList) => {
rid.length >= 3 ? `${_rid[0]}.${_rid[1]}.${sl.substring(0, 5)}` : _rid[0];

return [
ruleTarget.startsWith("Principle") ? "" : "SECTION508",
ruleTarget.startsWith("Principle") ? "" : "Section508",
window.WCAGA.includes(ruleTarget) ? "WCAGA" : "",
window.WCAGAA.includes(ruleTarget) ? "WCAGAA" : "",
window.WCAGAAA.includes(ruleTarget) ? "WCAGAAA" : "",
Expand Down
6 changes: 2 additions & 4 deletions kayle/lib/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ export const importRules = async (
| "pt_BR"
| "en",
runner: "htmlcs" | "axe",
baseDir?: "string"
baseDir?: "string",
): Promise<Rule[]> => {
const rules = await import(
`${baseDir || "./"}${locale.replace("-", "_")}/${
runner === "htmlcs" ? "htmlcs" : "axe"
}-rules`
`${baseDir || "./"}${locale.replace("-", "_")}/${runner === "htmlcs" ? "htmlcs" : "axe"}-rules`
);

return rules.axeRules || rules.htmlcsRules;
Expand Down
18 changes: 9 additions & 9 deletions kayle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kayle",
"version": "0.8.41",
"version": "0.8.43",
"description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.",
"main": "./build/index.js",
"keywords": [
Expand Down Expand Up @@ -76,18 +76,18 @@
"kayle_innate": "workspace:*"
},
"devDependencies": {
"@playwright/test": "^1.41.2",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.56",
"@swc/helpers": "^0.5.1",
"@types/jsdom": "^20.0.1",
"@types/node": "^18.11.9",
"@playwright/test": "^1.42.1",
"@swc/cli": "^0.3.10",
"@swc/core": "^1.4.6",
"@swc/helpers": "^0.5.6",
"@types/jsdom": "^21.1.6",
"@types/node": "^20.11.26",
"acorn": "^8.11.3",
"acorn-walk": "^8.3.2",
"escodegen": "^2.1.0",
"prettier": "^3.2.5",
"puppeteer": "^21.2.1",
"typescript": "^4.9.3"
"puppeteer": "^22.4.1",
"typescript": "^5.4.2"
},
"jest": {
"clearMocks": true,
Expand Down
Loading

0 comments on commit 430f359

Please sign in to comment.