@govtechsg/oobee 0.10.20 → 0.10.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.github/workflows/docker-test.yml +1 -1
  2. package/DETAILS.md +40 -25
  3. package/Dockerfile +41 -47
  4. package/LICENSE-3RD-PARTY-REPORT.txt +448 -0
  5. package/LICENSE-3RD-PARTY.txt +19913 -0
  6. package/README.md +26 -0
  7. package/__mocks__/mock-report.html +1503 -1360
  8. package/package.json +9 -5
  9. package/scripts/decodeUnzipParse.js +29 -0
  10. package/scripts/install_oobee_dependencies.command +2 -2
  11. package/scripts/install_oobee_dependencies.ps1 +3 -3
  12. package/src/cli.ts +9 -7
  13. package/src/combine.ts +13 -5
  14. package/src/constants/cliFunctions.ts +38 -1
  15. package/src/constants/common.ts +31 -5
  16. package/src/constants/constants.ts +28 -26
  17. package/src/constants/questions.ts +4 -1
  18. package/src/crawlers/commonCrawlerFunc.ts +114 -152
  19. package/src/crawlers/crawlDomain.ts +25 -32
  20. package/src/crawlers/crawlIntelligentSitemap.ts +7 -1
  21. package/src/crawlers/crawlLocalFile.ts +1 -1
  22. package/src/crawlers/crawlSitemap.ts +1 -1
  23. package/src/crawlers/custom/flagUnlabelledClickableElements.ts +546 -472
  24. package/src/crawlers/customAxeFunctions.ts +1 -1
  25. package/src/index.ts +2 -2
  26. package/src/mergeAxeResults.ts +590 -214
  27. package/src/screenshotFunc/pdfScreenshotFunc.ts +3 -3
  28. package/src/static/ejs/partials/components/scanAbout.ejs +65 -0
  29. package/src/static/ejs/partials/components/wcagCompliance.ejs +10 -29
  30. package/src/static/ejs/partials/footer.ejs +10 -13
  31. package/src/static/ejs/partials/scripts/categorySummary.ejs +2 -2
  32. package/src/static/ejs/partials/scripts/decodeUnzipParse.ejs +3 -0
  33. package/src/static/ejs/partials/scripts/reportSearch.ejs +1 -0
  34. package/src/static/ejs/partials/scripts/ruleOffcanvas.ejs +54 -52
  35. package/src/static/ejs/partials/scripts/scanAboutScript.ejs +38 -0
  36. package/src/static/ejs/partials/styles/styles.ejs +26 -1
  37. package/src/static/ejs/partials/summaryMain.ejs +15 -42
  38. package/src/static/ejs/report.ejs +22 -12
  39. package/src/utils.ts +10 -2
  40. package/src/xPathToCss.ts +186 -0
  41. package/a11y-scan-results.zip +0 -0
  42. package/src/types/xpath-to-css.d.ts +0 -3
@@ -56,7 +56,7 @@ export const customAxeConfig: Spec = {
56
56
  // selector: '*', // to be set with the checker function output xpaths converted to css selectors
57
57
  enabled: true,
58
58
  any: ['oobee-accessible-label'],
59
- tags: ['wcag2a', 'wcag211', 'wcag243', 'wcag412'],
59
+ tags: ['wcag2a', 'wcag211', 'wcag412'],
60
60
  metadata: {
61
61
  description: 'Ensures clickable elements have an accessible label.',
62
62
  help: 'Clickable elements must have accessible labels.',
package/src/index.ts CHANGED
@@ -7,7 +7,6 @@ import { EnqueueStrategy } from 'crawlee';
7
7
  import {
8
8
  getVersion,
9
9
  cleanUp,
10
- setHeadlessMode,
11
10
  getUserDataTxt,
12
11
  writeToUserDataTxt,
13
12
  } from './utils.js';
@@ -51,6 +50,7 @@ export type Answers = {
51
50
  exportDirectory: string;
52
51
  zip: string;
53
52
  ruleset: RuleFlags[];
53
+ generateJsonFiles: boolean;
54
54
  };
55
55
 
56
56
  export type Data = {
@@ -80,6 +80,7 @@ export type Data = {
80
80
  userDataDirectory?: string;
81
81
  zip?: string;
82
82
  ruleset: RuleFlags[];
83
+ generateJsonFiles: boolean;
83
84
  };
84
85
 
85
86
  const userData = getUserDataTxt();
@@ -109,7 +110,6 @@ const runScan = async (answers: Answers) => {
109
110
  const data: Data = await prepareData(answers);
110
111
  data.userDataDirectory = getClonedProfilesWithRandomToken(data.browser, data.randomToken);
111
112
 
112
- setHeadlessMode(data.browser, data.isHeadless);
113
113
  printMessage(['Scanning website...'], messageOptions);
114
114
 
115
115
  await combineRun(data, screenToScan);