Skip to content

Commit

Permalink
Merge branch 'main' into custom-element-role-change
Browse files Browse the repository at this point in the history
  • Loading branch information
scottaohara authored Feb 6, 2025
2 parents 7232042 + a2d34fe commit 13b52fc
Show file tree
Hide file tree
Showing 31 changed files with 2,173 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/accname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/accname/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
repository: w3c/accname
ref: gh-pages
path: accname
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: accname
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/core-aam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/core-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
repository: w3c/core-aam
ref: gh-pages
path: core-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: core-aam
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dpub-aam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/dpub-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
repository: w3c/dpub-aam
ref: gh-pages
path: dpub-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: dpub-aam
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dpub-aria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/dpub-aria/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
repository: w3c/dpub-aria
ref: gh-pages
path: dpub-aria
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: dpub-aria
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/graphics-aam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/graphics-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand All @@ -43,7 +43,7 @@ jobs:
repository: w3c/graphics-aam
ref: gh-pages
path: graphics-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: graphics-aam
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/html-amm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/html-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
repository: w3c/html-aam
ref: gh-pages
path: html-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: html-aam
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mathml-aam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/mathml-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand All @@ -43,7 +43,7 @@ jobs:
repository: w3c/mathml-aam
ref: gh-pages
path: mathml-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: mathml-aam
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pdf-aam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{secrets.ARIA_EDITOR_DRAFTS}}" \
-H "Authorization: Bearer ${{secrets.W3CGRUNTBOT_TOKEN}}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/w3c/pdf-aam/actions/workflows/build-from-monorepo.yaml/dispatches \
-d '{"ref":"gh-pages"}'
Expand Down Expand Up @@ -52,13 +52,13 @@ jobs:
repository: w3c/pdf-aam
ref: gh-pages
path: pdf-aam
token: ${{ secrets.ARIA_EDITOR_DRAFTS }}
token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: pdf-aam
- name: Copy files
run: |
cp -r aria/pdf-aam/** pdf-aam/
cp -r aria.common/aria/pdf-aam/** pdf-aam/
- name: Push new files to child repo
run: |
git config user.name "github-actions[bot]"
Expand Down
13 changes: 11 additions & 2 deletions accname/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script src="../common/script/resolveReferences.js" class="remove"></script>
<script src="../common/script/utility.js" class="remove"></script>
<script src="../common/biblio.js" class="remove" defer="defer"></script>
<script src="../common/script/participants.js" class="remove"></script>
<script class="remove">
var respecConfig = {
github: "w3c/accname",
Expand Down Expand Up @@ -131,7 +132,7 @@
REC: "https://www.w3.org/WAI/ARIA/apg/",
},

preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [addPlatformMaintainers],
//Pointing to the 1.2 versions but should remove the version in the publishing branch
xref: ["dom", "core-aam-1.2", "wai-aria-1.2", "infra"],
Expand Down Expand Up @@ -784,7 +785,15 @@ <h2>Substantive changes since the <a href="https://www.w3.org/TR/accname-1.1/">A
<section class="appendix informative section" id="acknowledgements">
<h3>Acknowledgments</h3>
<p>The following people contributed to the development of this document.</p>
<div data-include="../common/acknowledgements/aria-wg-active.html" data-include-replace="true"></div>
<ul id="gh-contributors">
<!-- GitHub contributors go here -->
</ul>
<section class="section" id="ack_group">
<h4>ARIA WG participants at the time of publication</h4>
<ul>
<!-- List of participants is injected here -->
</ul>
</section>
<div data-include="../common/acknowledgements/funders.html" data-include-replace="true"></div>
</section>
</section>
Expand Down
55 changes: 13 additions & 42 deletions common/script/participants.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,19 @@ function getParticipants() {
// Define the ID of the list element where the user information will be inserted
const LIST_ID = "ack_group";

/**
* Fetches users and their affiliations from the API and returns an array of user information.
* Each element in the array is an object containing the user's title and affiliation.
*
* @async
* @function getUsersInfo
* @returns {Promise<Array<{title: string, affiliation: string}>>} - A promise that resolves to an array of user information.
*/
async function getUsersInfo() {
// Send a GET request to the users endpoint
const response = await fetch(`${BASE_URL}/users`);
// Fetch the JSON data from the response
const data = await response.json();
// Extract the list of users
const users = data._links.users;

// Initialize an empty array to store user information
let usersInfo = [];
// Iterate over each user
for (const user of users) {
// Fetch the affiliation of the current user

const usersInfo = await Promise.all(users.map(async (user) => {
const affiliation = await getAffiliation(user);
// Push an object containing the user's title and affiliation to the usersInfo array
usersInfo.push({ title: user.title, affiliation: affiliation });
}
// Return the array containing information of all users
return { title: user.title, affiliation: affiliation };
}));

return usersInfo;
}

/**
* Fetches the affiliation of a given user from the API.
*
* @async
* @function getAffiliation
* @param {Object} user - The user object.
* @returns {Promise<string>} - A promise that resolves to the title of the user's affiliation.
*/

async function getAffiliation(user) {
// Send a GET request to the affiliations endpoint of the user
const response = await fetch(user.href + "/affiliations/");
Expand All @@ -58,23 +34,18 @@ function getParticipants() {
// Return the title of the affiliation
return affiliation;
}

/**
* Fetches users and their affiliations, creates a list item for each user with their title and affiliation,
* and appends these list items to a specified list in the document.
*
* @async
* @function insertUsersInfoIntoDocument
*/
async function insertUsersInfoIntoDocument() {
const usersInfo = await getUsersInfo();
const usersList = document.querySelector(`#${LIST_ID} ul`);

for (const user of usersInfo) {
const fragment = document.createDocumentFragment();

usersInfo.forEach(user => {
const li = document.createElement("li");
li.textContent = `${user.title} (${user.affiliation})`;
usersList.appendChild(li);
}
fragment.appendChild(li);
});

usersList.appendChild(fragment);
}

insertUsersInfoIntoDocument();
Expand Down
Loading

0 comments on commit 13b52fc

Please sign in to comment.