From 246e1149c4abc7ecd626ea8ef3291ba5af3c1b57 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:07:54 -0400 Subject: [PATCH 1/8] add pa11y task and CI integration --- .github/workflows/publish.yml | 5 +++++ .pa11yci | 7 +++++++ Makefile | 4 ++++ Rakefile | 5 +++++ pa11y-scan.sh | 16 ++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 .pa11yci create mode 100644 pa11y-scan.sh diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b0c78a3c0..b2e3e8dcc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,6 +34,11 @@ jobs: - name: Publish to the test repo run: GITHUB_TOKEN=${{ secrets.OSC_WIAG_PUB_REPO_TOKEN }} /bin/bash push.sh "ood-documentation-test" + + - name: Scan for accessibility + if: github.event_name == 'pull_request' + run: | + rake scan - name: Publish to the main repo if: github.event_name == 'push' diff --git a/.pa11yci b/.pa11yci new file mode 100644 index 000000000..485b8e225 --- /dev/null +++ b/.pa11yci @@ -0,0 +1,7 @@ +{ + "defaults": { + "chromeLaunchConfig": { + "args": ["--no-sandbox"] + } + } +} \ No newline at end of file diff --git a/Makefile b/Makefile index 54356f9e7..71c812e3e 100644 --- a/Makefile +++ b/Makefile @@ -229,3 +229,7 @@ spellcheck: $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR) @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +.PHONY: scan +scan: + sh /doc/pa11y-scan.sh diff --git a/Rakefile b/Rakefile index 8a425ca3a..32f7dd09c 100644 --- a/Rakefile +++ b/Rakefile @@ -20,6 +20,11 @@ task :spellcheck do exec "#{run_cmd} make spellcheck" end +desc "scan for accessibility" +task :scan do + exec "#{run_cmd} make scan" +end + desc "Open built documentation in browser" task :open do if windows? diff --git a/pa11y-scan.sh b/pa11y-scan.sh new file mode 100644 index 000000000..47a760375 --- /dev/null +++ b/pa11y-scan.sh @@ -0,0 +1,16 @@ +# Scan all pages +find /doc/build/html -name "*.html" | while read f; do + result=$(pa11y-ci "$f") + exit_code=$? + + if echo "$result" | grep -q "Error:"; then + echo "--- $f ---" + echo "$result" | grep -A2 "Error:" + fi + + if [ $exit_code -ne 0 ]; then + echo "pa11y-ci encountered an error on $f (exit code $exit_code). Stopping scan." + exit 1 + fi + echo -n "$result" +done | tee pa11y-report.txt | echo '' \ No newline at end of file From d379108ccf7b25832b07e436ba6f7db5058deacc Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:32:21 -0400 Subject: [PATCH 2/8] make scan its own CI task --- .github/workflows/scan.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/scan.yml diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml new file mode 100644 index 000000000..d491d277f --- /dev/null +++ b/.github/workflows/scan.yml @@ -0,0 +1,32 @@ +name: Publish Html + +on: + pull_request: + branches: [latest, develop, release-*] + +defaults: + run: + shell: bash + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: Setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: Make Html + run: | + rake build + + - name: Scan for accessibility + if: github.event_name == 'pull_request' + run: | + rake scan From 7e03951f4d7cc07545659a4b62a3bbd7fea4a8b3 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:36:52 -0400 Subject: [PATCH 3/8] refactor to not need script or makefile for scan --- Makefile | 6 +----- Rakefile | 4 ++-- pa11y-scan.sh | 16 ---------------- 3 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 pa11y-scan.sh diff --git a/Makefile b/Makefile index 71c812e3e..8f8c9d1a8 100644 --- a/Makefile +++ b/Makefile @@ -228,8 +228,4 @@ dummy: spellcheck: $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR) @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: scan -scan: - sh /doc/pa11y-scan.sh + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." \ No newline at end of file diff --git a/Rakefile b/Rakefile index 32f7dd09c..ec306ca08 100644 --- a/Rakefile +++ b/Rakefile @@ -22,7 +22,7 @@ end desc "scan for accessibility" task :scan do - exec "#{run_cmd} make scan" + exec "#{run_cmd} pa11y-ci /doc/build/html/**/*.html" end desc "Open built documentation in browser" @@ -42,7 +42,7 @@ def user_group end def image - 'ohiosupercomputer/ood-doc-build:v3.1.0' + 'ohiosupercomputer/ood-doc-build:latest' end def docker? diff --git a/pa11y-scan.sh b/pa11y-scan.sh deleted file mode 100644 index 47a760375..000000000 --- a/pa11y-scan.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Scan all pages -find /doc/build/html -name "*.html" | while read f; do - result=$(pa11y-ci "$f") - exit_code=$? - - if echo "$result" | grep -q "Error:"; then - echo "--- $f ---" - echo "$result" | grep -A2 "Error:" - fi - - if [ $exit_code -ne 0 ]; then - echo "pa11y-ci encountered an error on $f (exit code $exit_code). Stopping scan." - exit 1 - fi - echo -n "$result" -done | tee pa11y-report.txt | echo '' \ No newline at end of file From ececbb22e171f398059c0e11605f4bd081bd4f00 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:38:10 -0400 Subject: [PATCH 4/8] restore makefile and rakefile image --- Makefile | 2 +- Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8f8c9d1a8..54356f9e7 100644 --- a/Makefile +++ b/Makefile @@ -228,4 +228,4 @@ dummy: spellcheck: $(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR) @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." \ No newline at end of file + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/Rakefile b/Rakefile index ec306ca08..bed95c343 100644 --- a/Rakefile +++ b/Rakefile @@ -42,7 +42,7 @@ def user_group end def image - 'ohiosupercomputer/ood-doc-build:latest' + 'ohiosupercomputer/ood-doc-build:v3.1.0' end def docker? From d31b3756c6f3559bea6062d6a8feca0b6cd384a6 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:39:02 -0400 Subject: [PATCH 5/8] rename scan task --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index d491d277f..bf537c5f4 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -1,4 +1,4 @@ -name: Publish Html +name: Scan for accessibility on: pull_request: From 83ac72d57578c0fce24cb93700801648a4257764 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:39:43 -0400 Subject: [PATCH 6/8] restore publish.yml --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b2e3e8dcc..b0c78a3c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -34,11 +34,6 @@ jobs: - name: Publish to the test repo run: GITHUB_TOKEN=${{ secrets.OSC_WIAG_PUB_REPO_TOKEN }} /bin/bash push.sh "ood-documentation-test" - - - name: Scan for accessibility - if: github.event_name == 'pull_request' - run: | - rake scan - name: Publish to the main repo if: github.event_name == 'push' From 96450da9d335d80386914c72c4f91960574dfaf7 Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Thu, 14 May 2026 17:41:13 -0400 Subject: [PATCH 7/8] rename scan job --- .github/workflows/scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index bf537c5f4..74b174242 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -9,7 +9,7 @@ defaults: shell: bash jobs: - publish: + scan: runs-on: ubuntu-latest steps: From 353372b37620ea69bb92264f11346ac56f3cda3e Mon Sep 17 00:00:00 2001 From: Braeden Singleton Date: Fri, 15 May 2026 10:17:28 -0400 Subject: [PATCH 8/8] Update accessibility scan step in workflow Remove conditional check for pull request event in accessibility scan step. --- .github/workflows/scan.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 74b174242..316e56421 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -27,6 +27,5 @@ jobs: rake build - name: Scan for accessibility - if: github.event_name == 'pull_request' run: | rake scan