Skip to content

Commit 2da68aa

Browse files
howard-ew3cgruntbotremibetin
authored
For publication / deploy on Thursday March 20, 2025 (#394)
* Update `APG` to `WAI` pipeline workflows to handle desync issues and better reports on errors (#361) * Fix #219 * Update 'deploy.yml' to use 'w3cgruntbot' as committer * Update 'pr-create.yml' to force a rebase to happen with main in the case generated branch doesn't have relevant changes; additional error handling coverage with 'create-pr' script * For consistency, rename 'create-pr' script to 'pr-create' * Remove unnecessary delete branch action * Infrastructure: Add case to specially handle conflicts in submodule folder to `pr-create.yml` (#373) * Add case to specially handle conflicts in submodule folder * Additional pr-create.yml workflow changes to support submodule conflict resolution (#374) * Infrastructure: Disable git editor during `git rebase --continue` in `pr-create.yml` (#375) * Update transformPattern.js to support "patterns/landmarks" (#382) * Pin ruby 3.3.3 instead of 3.3.x during workflow builds (#384) * chore: Update `main` with latest changes from `aria-practices` * Remove use of ytkey (deprecated) (#370) * Infrastructure: Create `.tracked-html-assets.json` (#388) * Create .tracked-html-assets.json to make it easier to account for html assets which don't match with the expected html assets' naming structure * chore: Update `main` with latest changes from `aria-practices` * chore: Update `main` with latest changes from `aria-practices` * chore: Update `main` with latest changes from `aria-practices` * Update .tracked-html-assets.json (#395) --------- Co-authored-by: w3cgruntbot <[email protected]> Co-authored-by: Rémi Bétin <[email protected]>
1 parent 46448c3 commit 2da68aa

File tree

21 files changed

+586
-540
lines changed

21 files changed

+586
-540
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Ruby 3.3
2323
uses: ruby/setup-ruby@v1
2424
with:
25-
ruby-version: 3.3
25+
ruby-version: '3.3.3'
2626
bundler-cache: true
2727

2828
- name: Update git submodules
@@ -36,9 +36,12 @@ jobs:
3636
node ./scripts/pre-build
3737
3838
- name: Commit changed files and submodule updates
39-
uses: stefanzweifel/git-auto-commit-action@v4
39+
uses: stefanzweifel/git-auto-commit-action@v5
4040
with:
41-
commit_message: Commit changes
41+
commit_user_name: w3cgruntbot
42+
commit_user_email: [email protected]
43+
commit_author: w3cgruntbot <[email protected]>
44+
commit_message: "chore: Update `main` with latest changes from `aria-practices`"
4245
branch: main
4346
env:
4447
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pr-create.yml

Lines changed: 57 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ on:
1717
required: false
1818

1919
jobs:
20-
create-pr:
20+
pr-create:
2121
runs-on: ubuntu-latest
2222

2323
steps:
2424
- name: Get current job and log url
25-
uses: Tiryoh/gha-jobid-action@v0
25+
uses: Tiryoh/gha-jobid-action@v1
2626
id: jobs
2727
with:
2828
github_token: ${{ secrets.GITHUB_TOKEN }}
29-
job_name: create-pr
29+
job_name: pr-create
3030

3131
- uses: actions/checkout@v4
3232
with:
@@ -42,29 +42,62 @@ jobs:
4242
- name: Set up Ruby 3.3
4343
uses: ruby/setup-ruby@v1
4444
with:
45-
ruby-version: 3.3
45+
ruby-version: '3.3.3'
4646

4747
- name: Update git submodules
48-
if: github.event.inputs.fork_path == 'false'
4948
run: |
5049
git submodule update --recursive --remote
5150
cd _external/aria-practices
51+
if [ -n "${{ github.event.inputs.fork_path }}" ] && [ "${{ github.event.inputs.fork_path }}" != 'false' ]; then
52+
echo "Found fork: ${{ github.event.inputs.fork_path }}"
53+
git remote add fork https://github.com/${{ github.event.inputs.fork_path }}.git
54+
git fetch fork
55+
fi
5256
git checkout ${{ github.event.inputs.apg_sha }}
5357
54-
- name: Update git submodules from fork
55-
if: github.event.inputs.fork_path != 'false'
56-
run: |
57-
git submodule update --recursive --remote
58-
cd _external/aria-practices
59-
git remote add fork https://github.com/${{ github.event.inputs.fork_path }}.git
60-
git fetch fork
61-
git checkout ${{ github.event.inputs.apg_sha }}
62-
63-
- name: Switch to and create/update branch
58+
- name: Switch to and create or update branch
6459
run: |
6560
# switch to branch if exists or create branch
6661
git switch apg/${{ github.event.inputs.apg_branch }} 2>/dev/null || git switch -c apg/${{ github.event.inputs.apg_branch }}
6762
63+
- name: Force rebase the switched branch onto main
64+
run: |
65+
git config --global user.name "w3cgruntbot"
66+
git config --global user.email "[email protected]"
67+
git fetch origin main
68+
git rebase --force-rebase origin/main || true
69+
70+
# Handle cases where the aria-practices submodule has conflicts to be handled;
71+
# _external/data shouldn't have conflicting changes
72+
if [ -d "_external/aria-practices" ] && { [ -f ".git/rebase-apply" ] || [ -d ".git/rebase-merge" ]; }; then
73+
echo "Handling submodule conflicts..."
74+
cd _external/aria-practices
75+
76+
# Resolve the conflict
77+
git fetch origin
78+
git merge origin/main
79+
80+
# Add resolved submodule from project root
81+
cd -
82+
git add _external/aria-practices
83+
84+
# Continue the rebase
85+
GIT_EDITOR=true git rebase --continue || true
86+
87+
# Resolve conflicts for all other conflicting files automatically using 'theirs' from project root
88+
git diff --name-only --diff-filter=U | while read -r file; do
89+
git checkout --theirs "$file"
90+
git add "$file"
91+
done
92+
93+
# Continue the rebase
94+
GIT_EDITOR=true git rebase --continue || true
95+
else
96+
echo "No submodule conflicts detected or no rebase in progress."
97+
fi
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100+
68101
- name: Update site files
69102
id: update_site_files
70103
working-directory: ./
@@ -76,19 +109,23 @@ jobs:
76109

77110
- name: Commit changed files and submodule updates
78111
if: steps.update_site_files.outcome == 'success'
79-
uses: stefanzweifel/git-auto-commit-action@v4
112+
uses: stefanzweifel/git-auto-commit-action@v5
80113
with:
81-
commit_message: Commit changed files and submodule updates
114+
commit_user_name: w3cgruntbot
115+
commit_user_email: [email protected]
116+
commit_author: w3cgruntbot <[email protected]>
117+
commit_message: 'chore: Update branch with latest `${{ github.event.inputs.apg_branch }}` changes and submodule updates'
82118
branch: apg/${{ github.event.inputs.apg_branch }}
83119
push_options: '--force'
84120
env:
85121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86122

87-
- name: Create pull request
123+
- name: Create or update pull request
88124
working-directory: ./
89125
run: |
90-
npm install -C scripts/create-pr
91-
node ./scripts/create-pr
126+
set -e
127+
npm install -C scripts/pr-create
128+
node ./scripts/pr-create
92129
env:
93130
GH_TOKEN: ${{ secrets.W3CGRUNTBOT_TOKEN }}
94131
APG_SHA: ${{ github.event.inputs.apg_sha }}

.github/workflows/remove-branch.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15+
- uses: actions/checkout@v4
16+
1517
- name: Check if branch exists
1618
id: check_if_exists
1719
run: |
18-
OUTPUT=$(git ls-remote --heads https://github.com/${{ github.repository_owner }}/wai-aria-practices.git apg/${{ github.event.inputs.apg_branch }} | wc -l)
19-
echo "::set-output name=branch-exists::$(echo $OUTPUT)"
20+
BRANCH_EXISTS=$(git ls-remote --heads https://github.com/${{ github.repository_owner }}/wai-aria-practices.git apg/${{ github.event.inputs.apg_branch }} | wc -l)
21+
echo "BRANCH_EXISTS=$BRANCH_EXISTS" >> "$GITHUB_OUTPUT"
22+
2023
- name: Clean up generated branch
21-
if: ${{ steps.check_if_exists.outputs.branch-exists == '1' }}
22-
uses: dawidd6/action-delete-branch@v3
23-
with:
24-
github_token: ${{ github.token }}
25-
branches: apg/${{ github.event.inputs.apg_branch }}
24+
if: ${{ steps.check_if_exists.outputs.BRANCH_EXISTS == '1' }}
25+
run: |
26+
BRANCH_NAME="apg/${{ github.event.inputs.apg_branch }}"
27+
git config --global user.name "w3cgruntbot"
28+
git config --global user.email "[email protected]"
29+
git push origin --delete $BRANCH_NAME
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
2633
- name: Report branch already removed
27-
if: ${{ steps.check_if_exists.outputs.branch-exists == '0' }}
34+
if: ${{ steps.check_if_exists.outputs.BRANCH_EXISTS == '0' }}
2835
run: echo "Branch already removed"

ARIA/apg/patterns/slider-multithumb/examples/slider-multithumb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permalink: /ARIA/apg/patterns/slider-multithumb/examples/slider-multithumb/
1212

1313
sidebar: true
1414

15-
footer: " <div class='example-page-footer'> <p><a href='https://github.com/orgs/w3c/projects/124'>View issues related to this example</a></p> <p>Page last updated: 12 December 2024</p> </div> "
15+
footer: " <div class='example-page-footer'> <p><a href='https://github.com/orgs/w3c/projects/124'>View issues related to this example</a></p> <p>Page last updated: 12 February 2025</p> </div> "
1616

1717
# Context here: https://github.com/w3c/wai-aria-practices/issues/31
1818
type_of_guidance: APG

ARIA/apg/patterns/treegrid/examples/treegrid-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permalink: /ARIA/apg/patterns/treegrid/examples/treegrid-1/
1212

1313
sidebar: true
1414

15-
footer: " <div class='example-page-footer'> <p><a href='https://github.com/orgs/w3c/projects/117'>View issues related to this example</a></p> <p>Page last updated: 22 October 2024</p> </div> "
15+
footer: " <div class='example-page-footer'> <p><a href='https://github.com/orgs/w3c/projects/117'>View issues related to this example</a></p> <p>Page last updated: 18 March 2025</p> </div> "
1616

1717
# Context here: https://github.com/w3c/wai-aria-practices/issues/31
1818
type_of_guidance: APG

ARIA/apg/practices/grid-and-table-properties/grid-and-table-properties-practice.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ if (enableSidebar) document.body.classList.add('has-sidebar');
158158
aria-rowcount tells assistive technologies the actual size of the grid
159159
is 463 rows even though only 4 rows are present in the markup.
160160
--&gt;
161-
&lt;table role=&quot;grid&quot; aria-rowcount=&quot;463&quot;&gt;
162-
aria-label=&quot;Student roster for history 101&quot;
161+
&lt;table role=&quot;grid&quot; aria-rowcount=&quot;463&quot; aria-label=&quot;Student roster for history 101&quot;&gt;
163162
&lt;thead&gt;
164163
&lt;tr aria-rowindex=&quot;1&quot;&gt;
165164
&lt;th&gt;Last Name&lt;/th&gt;
@@ -280,8 +279,8 @@ if (enableSidebar) document.body.classList.add('has-sidebar');
280279
In this example, the first two columns with the student name are shown, but the score columns have been scrolled to show columns 10 through 13.
281280
Columns 3 through 9 are not visible so are not in the DOM.
282281
</p>
283-
<pre><code>&lt;table role=&quot;grid&quot; aria-rowcount=&quot;463&quot; aria-colcount=&quot;13&quot;&gt;
284-
aria-label=&quot;Student grades for history 101&quot;
282+
<pre><code>&lt;table role=&quot;grid&quot; aria-rowcount=&quot;463&quot; aria-colcount=&quot;13&quot;
283+
aria-label=&quot;Student grades for history 101&quot;&gt;
285284
&lt;!--
286285
aria-rowcount and aria-colcount tell assistive technologies
287286
the actual size of the grid is 463 rows by 13 columns,

ARIA/apg/practices/landmark-regions/landmark-regions-practice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ if (enableSidebar) document.body.classList.add('has-sidebar');
424424

425425
<li>If a page includes more than one <code>region</code> landmark, each should have a unique label (see <a href="#aria_lh_step3">Step 3</a> above).</li>
426426

427-
<li>The <code>region</code> landmark can be used identify content that named landmarks do not appropriately describe.</li>
427+
<li>The <code>region</code> landmark can be used to identify content that named landmarks do not appropriately describe.</li>
428428
</ul>
429429

430430
<section>

_config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ kramwdown:
3333
highlighter: rouge
3434
repository: w3c/wai-aria-practices
3535

36-
ytkey: AIzaSyCiZ9uToWu9jb7BTx47NtzCvmGGXKXp8nI
37-
3836
remote_theme: w3c/wai-website-theme
3937

4038
collections:

0 commit comments

Comments
 (0)