@govtechsg/oobee 0.10.21 → 0.10.29
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.
- package/.github/workflows/docker-test.yml +1 -1
- package/DETAILS.md +40 -25
- package/Dockerfile +41 -47
- package/INSTALLATION.md +1 -1
- package/LICENSE-3RD-PARTY-REPORT.txt +448 -0
- package/LICENSE-3RD-PARTY.txt +19913 -0
- package/README.md +10 -2
- package/__mocks__/mock-report.html +1503 -1360
- package/package.json +8 -4
- package/scripts/decodeUnzipParse.js +29 -0
- package/scripts/install_oobee_dependencies.command +2 -2
- package/scripts/install_oobee_dependencies.ps1 +3 -3
- package/src/cli.ts +3 -2
- package/src/combine.ts +1 -0
- package/src/constants/cliFunctions.ts +17 -3
- package/src/constants/common.ts +29 -5
- package/src/constants/constants.ts +28 -26
- package/src/constants/questions.ts +4 -1
- package/src/crawlers/commonCrawlerFunc.ts +159 -187
- package/src/crawlers/crawlDomain.ts +29 -30
- package/src/crawlers/crawlIntelligentSitemap.ts +7 -1
- package/src/crawlers/crawlLocalFile.ts +1 -1
- package/src/crawlers/crawlSitemap.ts +1 -1
- package/src/crawlers/custom/flagUnlabelledClickableElements.ts +546 -472
- package/src/crawlers/customAxeFunctions.ts +2 -2
- package/src/index.ts +0 -2
- package/src/mergeAxeResults.ts +608 -220
- package/src/screenshotFunc/pdfScreenshotFunc.ts +3 -3
- package/src/static/ejs/partials/components/wcagCompliance.ejs +10 -29
- package/src/static/ejs/partials/footer.ejs +10 -13
- package/src/static/ejs/partials/scripts/categorySummary.ejs +2 -2
- package/src/static/ejs/partials/scripts/decodeUnzipParse.ejs +3 -0
- package/src/static/ejs/partials/scripts/reportSearch.ejs +1 -0
- package/src/static/ejs/partials/scripts/ruleOffcanvas.ejs +54 -52
- package/src/static/ejs/partials/styles/styles.ejs +4 -0
- package/src/static/ejs/partials/summaryMain.ejs +15 -42
- package/src/static/ejs/report.ejs +21 -12
- package/src/utils.ts +10 -2
- package/src/xPathToCss.ts +186 -0
- package/a11y-scan-results.zip +0 -0
- package/src/types/xpath-to-css.d.ts +0 -3
@@ -36,7 +36,7 @@ jobs:
|
|
36
36
|
run: |
|
37
37
|
docker exec oobee-container cat logs/*/*.txt || true
|
38
38
|
- name: Copy Results from Docker Container
|
39
|
-
run: docker cp oobee-container:/app/results ./results
|
39
|
+
run: docker cp oobee-container:/app/oobee/results ./results
|
40
40
|
|
41
41
|
- name: Zip Results
|
42
42
|
run: zip -r results.zip ./results
|
package/DETAILS.md
CHANGED
@@ -14,31 +14,43 @@ Details of each issue and severity rating provided by the current scan engine.
|
|
14
14
|
|
15
15
|
## Conformance Covered
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
|
20
|
-
|
21
|
-
| WCAG 1.
|
22
|
-
| WCAG 1.
|
23
|
-
| WCAG 1.
|
24
|
-
| WCAG 1.
|
25
|
-
| WCAG 1.4.
|
26
|
-
| WCAG 1.4.
|
27
|
-
| WCAG 1.4.
|
28
|
-
| WCAG 1.4.
|
29
|
-
| WCAG
|
30
|
-
| WCAG
|
31
|
-
| WCAG 2.
|
32
|
-
| WCAG 2.2.
|
33
|
-
| WCAG 2.
|
34
|
-
| WCAG 2.4
|
35
|
-
| WCAG 2.4.
|
36
|
-
| WCAG 2.4.
|
37
|
-
| WCAG
|
38
|
-
| WCAG
|
39
|
-
| WCAG
|
40
|
-
| WCAG 3.
|
41
|
-
| WCAG
|
17
|
+
Note: Level AAA are disabled by default. Please specify `enable-wcag-aaa` in ruleset flag to enable AAA rules.
|
18
|
+
|
19
|
+
| Conformance | Level |
|
20
|
+
|-------------|-------|
|
21
|
+
| WCAG 1.1.1 | A |
|
22
|
+
| WCAG 1.2.2 | A |
|
23
|
+
| WCAG 1.3.1 | A |
|
24
|
+
| WCAG 1.3.5 | AA |
|
25
|
+
| WCAG 1.4.1 | A |
|
26
|
+
| WCAG 1.4.2 | A |
|
27
|
+
| WCAG 1.4.3 | AA |
|
28
|
+
| WCAG 1.4.4 | AA |
|
29
|
+
| WCAG 1.4.6 | AAA |
|
30
|
+
| WCAG 1.4.12 | AA |
|
31
|
+
| WCAG 2.1.1 | A |
|
32
|
+
| WCAG 2.2.1 | A |
|
33
|
+
| WCAG 2.2.2 | A |
|
34
|
+
| WCAG 2.2.4 | AAA |
|
35
|
+
| WCAG 2.4.1 | A |
|
36
|
+
| WCAG 2.4.2 | A |
|
37
|
+
| WCAG 2.4.4 | A |
|
38
|
+
| WCAG 2.4.9 | AAA |
|
39
|
+
| WCAG 2.5.8 | AA |
|
40
|
+
| WCAG 3.1.1 | A |
|
41
|
+
| WCAG 3.1.2 | AA |
|
42
|
+
| WCAG 3.1.5 | AAA |
|
43
|
+
| WCAG 3.2.5 | AAA |
|
44
|
+
| WCAG 3.3.2 | A |
|
45
|
+
| WCAG 4.1.2 | A |
|
46
|
+
|
47
|
+
### Summary
|
48
|
+
| Level | Count |
|
49
|
+
|-------|-------|
|
50
|
+
| A | 15 |
|
51
|
+
| AA | 5 |
|
52
|
+
| AAA | 5 |
|
53
|
+
|
42
54
|
|
43
55
|
## WCAG 2.0 Level A
|
44
56
|
|
@@ -99,6 +111,8 @@ Details of each issue and severity rating provided by the current scan engine.
|
|
99
111
|
| td-headers-attr | Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table | Must Fix | WCAG 1.3.1 |
|
100
112
|
| th-has-data-cells | Ensure that `<th>` elements and elements with role=columnheader/rowheader have data cells they describe | Must Fix | WCAG 1.3.1 |
|
101
113
|
| video-caption | Ensures `<video>` elements have captions | Must Fix | WCAG 1.2.2 |
|
114
|
+
| oobee-confusing-alt-text | The image alt text set as 'img', 'image', 'picture', 'photo', or 'graphic' is confusing or not useful | Must Fix | WCAG 1.1.1
|
115
|
+
| oobee-accessible-label | Clickable elements (i.e. elements with mouse-click interaction) must have accessible labels. | Must Fix | WCAG 2.1.1, WCAG 4.1.2 |
|
102
116
|
|
103
117
|
## WCAG 2.0 Level AA
|
104
118
|
|
@@ -128,6 +142,7 @@ Details of each issue and severity rating provided by the current scan engine.
|
|
128
142
|
| color-contrast-enhanced | Ensure the contrast between foreground and background colors meets WCAG 2 AAA enhanced contrast ratio thresholds | Must Fix | WCAG 1.4.6 |
|
129
143
|
| identical-links-same-purpose | Ensure that links with the same accessible name serve a similar purpose | Good to Fix | WCAG 2.4.9 |
|
130
144
|
| meta-refresh-no-exceptions | Ensure <meta http-equiv="refresh"> is not used for delayed refresh | Good to Fix | WCAG 2.2.4, WCAG 3.2.5 |
|
145
|
+
| oobee-grading-text-contents | Text content should be clear and plain to ensure that it is easily understood. | Needs Review | WCAG 3.1.5 |
|
131
146
|
|
132
147
|
## Best Practice
|
133
148
|
|
package/Dockerfile
CHANGED
@@ -1,60 +1,54 @@
|
|
1
|
-
# Use
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<installpath>/opt/verapdf</installpath> \n\
|
13
|
-
</com.izforge.izpack.panels.target.TargetPanel> \n\
|
14
|
-
<com.izforge.izpack.panels.packs.PacksPanel id="sdk_pack_select"> \n\
|
15
|
-
<pack index="0" name="veraPDF GUI" selected="true"/> \n\
|
16
|
-
<pack index="1" name="veraPDF Batch files" selected="true"/> \n\
|
17
|
-
<pack index="2" name="veraPDF Validation model" selected="false"/> \n\
|
18
|
-
<pack index="3" name="veraPDF Documentation" selected="false"/> \n\
|
19
|
-
<pack index="4" name="veraPDF Sample Plugins" selected="false"/> \n\
|
20
|
-
</com.izforge.izpack.panels.packs.PacksPanel> \n\
|
21
|
-
<com.izforge.izpack.panels.install.InstallPanel id="install"/> \n\
|
22
|
-
<com.izforge.izpack.panels.finish.FinishPanel id="finish"/> \n\
|
23
|
-
</AutomatedInstallation> ' >> /opt/verapdf-auto-install-docker.xml
|
24
|
-
|
25
|
-
RUN wget "https://github.com/GovTechSG/oobee/releases/download/cache/verapdf-installer.zip" -P /opt
|
26
|
-
RUN unzip /opt/verapdf-installer.zip -d /opt
|
27
|
-
RUN latest_version=$(ls -d /opt/verapdf-greenfield-* | sort -V | tail -n 1) && [ -n "$latest_version" ] && \
|
28
|
-
"$latest_version/verapdf-install" "/opt/verapdf-auto-install-docker.xml"
|
29
|
-
RUN rm -rf /opt/verapdf-installer.zip /opt/verapdf-greenfield-*
|
30
|
-
|
31
|
-
# Set oobee directory
|
32
|
-
WORKDIR /app
|
1
|
+
# Use Microsoft Playwright image as base image
|
2
|
+
# Node version is v22
|
3
|
+
FROM mcr.microsoft.com/playwright:v1.50.0-noble
|
4
|
+
|
5
|
+
# Installation of packages for oobee and runner
|
6
|
+
RUN apt-get update && apt-get install -y zip git
|
7
|
+
|
8
|
+
WORKDIR /app/oobee
|
9
|
+
|
10
|
+
# Clone oobee repository
|
11
|
+
# RUN git clone --branch master https://github.com/GovTechSG/oobee.git /app/oobee
|
33
12
|
|
34
|
-
# Copy
|
35
|
-
COPY
|
13
|
+
# OR Copy oobee files from local directory
|
14
|
+
COPY . .
|
36
15
|
|
37
16
|
# Environment variables for node and Playwright
|
38
17
|
ENV NODE_ENV=production
|
39
18
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD="true"
|
40
|
-
ENV PLAYWRIGHT_BROWSERS_PATH="/opt/ms-playwright"
|
41
|
-
ENV PATH="/opt/verapdf:${PATH}"
|
42
19
|
|
43
|
-
# Install dependencies
|
44
|
-
RUN npm
|
20
|
+
# Install oobee dependencies
|
21
|
+
RUN npm ci --omit=dev
|
22
|
+
|
23
|
+
# Compile TypeScript for oobee
|
24
|
+
RUN npm run build || true # true exits with code 0 - workaround for TS errors
|
45
25
|
|
46
26
|
# Install Playwright browsers
|
47
|
-
RUN npx playwright install chromium
|
27
|
+
RUN npx playwright install chromium
|
48
28
|
|
49
29
|
# Add non-privileged user
|
50
|
-
|
51
|
-
RUN
|
30
|
+
# Create a group named "purple"
|
31
|
+
RUN groupadd -r purple
|
52
32
|
|
53
|
-
#
|
54
|
-
|
33
|
+
# Create a user named "purple" and assign it to the group "purple"
|
34
|
+
RUN useradd -r -g purple purple
|
55
35
|
|
56
|
-
#
|
57
|
-
|
36
|
+
# Create a dedicated directory for the "purple" user and set permissions
|
37
|
+
RUN mkdir -p /home/purple && chown -R purple:purple /home/purple
|
58
38
|
|
59
|
-
|
60
|
-
|
39
|
+
WORKDIR /app
|
40
|
+
|
41
|
+
# Set the ownership of the oobee directory to the user "purple"
|
42
|
+
RUN chown -R purple:purple /app
|
43
|
+
|
44
|
+
# Copy any application and support files
|
45
|
+
# COPY . .
|
46
|
+
|
47
|
+
# Install any app dependencies for your application
|
48
|
+
# RUN npm ci --omit=dev
|
49
|
+
|
50
|
+
# For oobee to be run from present working directory, comment out as necessary
|
51
|
+
WORKDIR /app/oobee
|
52
|
+
|
53
|
+
# Run everything after as non-privileged user.
|
54
|
+
USER purple
|
package/INSTALLATION.md
CHANGED
@@ -6,7 +6,7 @@ Oobee (CLI) is provided as a portable distribution which minimises installation
|
|
6
6
|
|
7
7
|
Oobee is a customisable, automated accessibility testing tool that allows software development teams to find and fix accessibility problems to improve persons with disabilities (PWDs) access to digital services.
|
8
8
|
|
9
|
-
Oobee (CLI) allows software engineers to run Oobee as part of their software development environment as the command line, as well as [integrate it into their CI/CD pipleline](
|
9
|
+
Oobee (CLI) allows software engineers to run Oobee as part of their software development environment as the command line, as well as [integrate it into their CI/CD pipleline](INTEGRATION.md).
|
10
10
|
|
11
11
|
## System Requirements
|
12
12
|
|