Skip to content

Commit c27fa55

Browse files
authored
Merge pull request #33 from Stony-Brook-Astronomy/pa11y
add CI
2 parents e36186c + 7c98fcf commit c27fa55

6 files changed

Lines changed: 90 additions & 18 deletions

File tree

.github/workflows/html5validator.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
- master
7+
pull_request:
8+
branches:
9+
- main
810

911
jobs:
1012
html5validate:

.github/workflows/pa11y.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: pa11y accessibility tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
pa11y:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: '24'
22+
23+
- name: Install pa11y-ci + server
24+
run: |
25+
npm install --no-save pa11y-ci@latest http-server@latest
26+
27+
- name: Start static server
28+
run: |
29+
npx http-server . -p 8080 --silent &
30+
# Give the server a moment to start
31+
sleep 1
32+
33+
- name: Preprocess
34+
run: for i in $(git grep -l '<base href="/astro/">'); do sed -i s/'<base href="\/astro\/">'// $i; done
35+
36+
- name: Run pa11y checks (and do not fail yet)
37+
run: |
38+
set +e
39+
# Capture CLI output for the artifact (don’t care about its exit)
40+
npx pa11y-ci --reporter cli 2>&1 | tee pa11y-report.txt || true
41+
# Run JSON for the real gate (this exit code controls the job)
42+
npx pa11y-ci --json > pa11y-report.json 2>&1
43+
PA11Y_EXIT=$?
44+
echo "PA11Y_EXIT=$PA11Y_EXIT" >> $GITHUB_ENV
45+
set -e
46+
47+
- name: Upload pa11y report
48+
if: always()
49+
uses: actions/upload-artifact@v6
50+
with:
51+
name: pa11y-report
52+
path: |
53+
pa11y-report.txt
54+
pa11y-report.json
55+
56+
- name: Fail job if pa11y found issues
57+
run: |
58+
exit $PA11Y_EXIT
59+

.pa11yci

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"defaults": {
3+
"standard": "WCAG2AA",
4+
"timeout": 60000,
5+
"threshold": 0,
6+
"chromeLaunchConfig": {
7+
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
8+
}
9+
},
10+
"urls": [
11+
"http://127.0.0.1:8080/index.html",
12+
"http://127.0.0.1:8080/about.html",
13+
"http://127.0.0.1:8080/facilities.html",
14+
"http://127.0.0.1:8080/people.html",
15+
"http://127.0.0.1:8080/research.html"
16+
]
17+
}

academics.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,6 @@ <h2>Undergraduate Program</h2>
204204
describing the state of that field.</li>
205205
</ul>
206206

207-
<p><h2>Feingold Prize</h2>
208-
209-
210-
<p><ul><li>Each semester, we award
211-
the <a href="http://www.physics.sunysb.edu/Physics/awards/Award%20Feingold.pdf">Feingold
212-
Prize in Introductory Astronomy</a> to the best student in each of the
213-
3 introduction classes we offer (AST 101, 105, and 248).</li></ul>
214-
215-
216207
<p><header class="major">
217208
<h2>Graduate Program</h2>
218209
<span class="byline">Graduate students work toward a

css/style.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -938,22 +938,25 @@ input[type="button"].small,
938938
border-style: solid;
939939
border-width: 0px;
940940
border-bottom-width: thin;
941-
color: #777777;
941+
color: #444444;
942942
}
943943

944-
#people tr.legend
944+
#people th.legend
945945
{
946946
font-size: 100%;
947947
text-align: left;
948-
color: #777777;
948+
color: #444444;
949+
background: #fff;
950+
padding: 0;
949951
}
950952

951953
#people td.legend
952954
{
953955
font-size: 100%;
954956
text-align: left;
955-
color: #777777;
957+
color: #444444;
956958
padding-bottom: 0em;
959+
background: #fff;
957960
}
958961

959962

people.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ <h2>Directory</h2>
9090

9191

9292
<tr class="legend">
93-
<td class="legend">name / title</td>
94-
<td class="legend">research interests / publications<sup>1</sup></td>
95-
<td class="legend">phone<sup>2</sup> / office</td>
96-
<td class="legend">e-mail<sup>3</sup></td>
93+
<th class="legend">name / title</th>
94+
<th class="legend">research interests / publications<sup>1</sup></th>
95+
<th class="legend">phone<sup>2</sup> / office</th>
96+
<th class="legend">e-mail<sup>3</sup></th>
9797
</tr>
9898

9999
<tr class="directory">

0 commit comments

Comments
 (0)