Skip to content

Commit

Permalink
Editorial: Adds script to get ARIA participants and Respec gh-contrib…
Browse files Browse the repository at this point in the history
…utors functionality to the specs that did not have it (#2288)

Closes w3c/aria-common#109


Co-authored-by: daniel-montalvo <[email protected]>
  • Loading branch information
daniel-montalvo and daniel-montalvo authored Dec 11, 2024
1 parent 88aad67 commit 801bdb8
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 140 deletions.
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
10 changes: 8 additions & 2 deletions core-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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></script>
<script src="../common/script/participants.js" class="remove"></script>

<link href="../common/css/mapping-tables.css" rel="stylesheet" type="text/css" />
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
Expand Down Expand Up @@ -130,7 +131,7 @@
REC: "https://www.w3.org/TR/accname-1.2/",
},

preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [addPlatformMaintainers],
xref: ["dom", "accname", "wai-aria", "infra"],
};
Expand Down Expand Up @@ -11248,7 +11249,12 @@ <h3>Acknowledgments</h3>
<ul id="gh-contributors">
<!-- list of contributors will appear here, along with link to their GitHub profiles -->
</ul>
<div data-include="../common/acknowledgements/aria-wg-active.html" data-include-replace="true"></div>
<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>
</body>
Expand Down
29 changes: 10 additions & 19 deletions dpub-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script src="../common/script/resolveReferences.js" class="remove"></script>
<script src="../common/script/participants.js" class="remove"></script>
<link href="../common/css/mapping-tables.css" rel="stylesheet" type="text/css" />
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
<script class="remove">
Expand Down Expand Up @@ -147,7 +148,7 @@
CR: "https://www.w3.org/TR/accname-1.2/",
REC: "https://www.w3.org/TR/accname-1.2/",
},
preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [],
xref: ["core-aam", "wai-aria", "dom", "infra", "accname"],
lint: {
Expand Down Expand Up @@ -2679,25 +2680,15 @@ <h4>Other substantive changes since <a href="https://www.w3.org/TR/2017/REC-dpub
<h3>Acknowledgments</h3>

<p>The following people contributed to the development of this document:</p>

<ul>
<li>James Craig (Apple Inc.)</li>
<li>Romain Deltour (DAISY Consortium)</li>
<li>Joanmarie Diggs (Igalia)</li>
<li>Matt Garrish (DAISY Consortium)</li>
<li>George Kerscher (DAISY Consortium)</li>
<li>Peter Krautzberger (W3C Invited Experts)</li>
<li>Charles Lapierre (Benetech)</li>
<li>Aaron Leventhal (Google)</li>
<li>Daniel Montalvo (W3C Staff)</li>
<li>James Nurthen (Adobe)</li>
<li>Scott O'Hara (Microsoft Corporation)</li>
<li>Gregorio Pellegrino (Fondazione LIA)</li>
<li>Tzviya Siegman (Wiley)</li>
<li>Avneesh Singh (DAISY Consortium)</li>
<li>Valerie Young (Igalia)</li>
<ul id="gh-contributors">
<!-- List of GitHub contributors goes 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
29 changes: 10 additions & 19 deletions dpub-aria/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script src="../common/script/resolveReferences.js" class="remove"></script>
<script src="../common/biblio.js" class="remove" defer="defer"></script>
<script src="../common/script/participants.js" class="remove"></script>
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
<script class="remove" src="../common/script/ariaChild.js"></script>
<script class="remove" src="../common/script/roleInfo.js"></script>
Expand Down Expand Up @@ -109,7 +110,7 @@
CRD: "https://www.w3.org/TR/wai-aria-practices-1.2/",
REC: "https://www.w3.org/TR/wai-aria-practices-1.2/",
},
preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [ariaAttributeReferences],
definitionMap: [],
xref: ["core-aam", "accname", "wai-aria", "dom", "infra"],
Expand Down Expand Up @@ -4466,25 +4467,15 @@ <h3>Substantive changes since the <a href="https://www.w3.org/TR/dpub-aria-1.0/"
<h2>Acknowledgments</h2>

<p>The following people contributed to the development of this document:</p>

<ul>
<li>James Craig (Apple Inc.)</li>
<li>Romain Deltour (DAISY Consortium)</li>
<li>Joanmarie Diggs (Igalia)</li>
<li>Matt Garrish (DAISY Consortium)</li>
<li>George Kerscher (DAISY Consortium)</li>
<li>Peter Krautzberger (W3C Invited Experts)</li>
<li>Charles Lapierre (Benetech)</li>
<li>Aaron Leventhal (Google)</li>
<li>Daniel Montalvo (W3C Staff)</li>
<li>James Nurthen (Adobe)</li>
<li>Scott O'Hara (Microsoft Corporation)</li>
<li>Gregorio Pellegrino (Fondazione LIA)</li>
<li>Tzviya Siegman (Wiley)</li>
<li>Avneesh Singh (DAISY Consortium)</li>
<li>Valerie Young (Igalia)</li>
<ul id="gh-contributors">
<!-- list goes 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>
</body>
Expand Down
21 changes: 3 additions & 18 deletions graphics-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer="defer"></script>
<script src="../common/script/resolveReferences.js" class="remove"></script>
<script src="../common/biblio.js" class="remove" defer="defer"></script>
<script src="../common/script/participants.js" class="remove"></script>
<link href="../common/css/mapping-tables.css" rel="stylesheet" type="text/css" />
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
<!--<link href="css/dpub-aam.css" rel="stylesheet" type="text/css"/>-->
Expand Down Expand Up @@ -172,7 +173,7 @@
PR: "https://www.w3.org/TR/graphics-aam-1.0/",
REC: "https://www.w3.org/TR/graphics-aam-1.0/",
},
preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [],
definitionMap: [],
xref: ["core-aam", "accname", "wai-aria", "dom", "infra"],
Expand Down Expand Up @@ -502,23 +503,7 @@ <h4>Participants active in the SVG accessibility task force at the time of publi
<section class="section" id="ack_group">
<h4>Participants active in the ARIA WG at the time of publication</h4>
<ul>
<li>David Bolter (Mozilla Foundation)</li>
<li>Michael Cooper (W3C/MIT)</li>
<li>James Craig (Apple Inc.)</li>
<li>Joanmarie Diggs (Igalia)</li>
<li>John Foliot (Invited Expert)</li>
<li>Christopher Gallelo (Microsoft Corporation)</li>
<li>Bryan Garaventa (SSB BART Group)</li>
<li>Jon Gunderson (University of Illinois at Urbana-Champaign)</li>
<li>Matthew King (IBM Corporation)</li>
<li>Dominic Mazzoni (Google, Inc.)</li>
<li>Shane McCarron (Invited Expert, Aptest)</li>
<li>James Nurthen (Oracle Corporation)</li>
<li>Janina Sajka (Invited Expert, The Linux Foundation)</li>
<li>Stefan Schnabel (SAP AG)</li>
<li>Lisa Seeman (Invited Expert)</li>
<li>Alexander Surkov (Mozilla Foundation)</li>
<li>Jason White (Educational Testing Service)</li>
<!-- List goes here -->
</ul>
</section>
<div data-include="../common/acknowledgements/funders.html" data-include-replace="true"></div>
Expand Down
22 changes: 4 additions & 18 deletions graphics-aria/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer="defer"></script>
<script src="../common/script/resolveReferences.js" class="remove"></script>
<script src="../common/biblio.js" class="remove" defer="defer"></script>
<script src="../common/script/participants.js" class="remove"></script>
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
<script class="remove" src="../common/script/ariaChild.js"></script>
<script class="remove" src="../common/script/roleInfo.js"></script>
Expand Down Expand Up @@ -148,7 +149,7 @@
REC: "https://www.w3.org/TR/wai-aria-1.1/",
},

preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [ariaAttributeReferences],
definitionMap: [],
xref: ["core-aam", "accname", "wai-aria"],
Expand Down Expand Up @@ -1169,6 +1170,7 @@ <h2>Other substantive changes since the <a href="http://www.w3.org/TR/2015/WD-gr
<section class="appendix informative section" id="acknowledgements">
<h3>Acknowledgments</h3>
<p>The following people contributed to the development of this document.</p>
<ul id="gh-contributors"></ul>
<section class="section" id="ack_svga11y">
<h4>Participants active in the SVG accessibility task force at the time of publication</h4>
<ul>
Expand All @@ -1185,23 +1187,7 @@ <h4>Participants active in the SVG accessibility task force at the time of publi
<section class="section" id="ack_group">
<h4>Participants active in the ARIA WG at the time of publication</h4>
<ul>
<li>David Bolter (Mozilla Foundation)</li>
<li>Michael Cooper (W3C/MIT)</li>
<li>James Craig (Apple Inc.)</li>
<li>Joanmarie Diggs (Igalia)</li>
<li>John Foliot (Invited Expert)</li>
<li>Christopher Gallelo (Microsoft Corporation)</li>
<li>Bryan Garaventa (SSB BART Group)</li>
<li>Jon Gunderson (University of Illinois at Urbana-Champaign)</li>
<li>Matthew King (IBM Corporation)</li>
<li>Dominic Mazzoni (Google, Inc.)</li>
<li>Shane McCarron (Invited Expert, Aptest)</li>
<li>James Nurthen (Oracle Corporation)</li>
<li>Janina Sajka (Invited Expert, The Linux Foundation)</li>
<li>Stefan Schnabel (SAP AG)</li>
<li>Lisa Seeman (Invited Expert)</li>
<li>Alexander Surkov (Mozilla Foundation)</li>
<li>Jason White (Educational Testing Service)</li>
<!-- List goes here -->
</ul>
</section>
<div data-include="../common/acknowledgements/funders.html" data-include-replace="true"></div>
Expand Down
24 changes: 11 additions & 13 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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>
<link href="../common/css/mapping-tables.css" rel="stylesheet" type="text/css" />
<link href="../common/css/common.css" rel="stylesheet" type="text/css" />
<link href="css/html-aam.css" rel="stylesheet" />
Expand Down Expand Up @@ -72,7 +72,7 @@
},

xref: ["HTML", "core-aam", "accname", "wai-aria", "dom", "infra"],
preProcess: [linkCrossReferences],
preProcess: [linkCrossReferences, getParticipants],
postProcess: [fixContributors],
a11y: false,
};
Expand Down Expand Up @@ -16656,17 +16656,15 @@ <h4>Substantive changes since moving to the Web Application Working Group (forme
<section class="appendix informative" id="acknowledgements">
<h3>Acknowledgments</h3>
<p>The following people contributed to the development of this document.</p>
<div class="section" id="ack_group">
<!-- left in place to ensure deep links to ID remain functional -->
<ul id="gh-contributors"></ul>
<!-- list of contributors will appear here,
along with link to their GitHub profiles -->
<!--
TODO:
Add listing of individuals who have providing meaningful
contributions through commenting that have impacted the specification.
--></div>
<div data-include="https://rawgit.com/w3c/aria/master/../common/acknowledgements/funders.html" data-include-replace="true"></div>
<ul id="gh-contributors"></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>
<!-- TODO:e Include people whose comments have added value to the specification -->
<div data-include="../common//acknowledgements/funders.html" data-include-replace="true"></div>
</section>
</section>
</body>
Expand Down
Loading

1 comment on commit 801bdb8

@pkra
Copy link
Member

@pkra pkra commented on 801bdb8 Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-montalvo could you look into the CI failures? It says something about a user not being allowed to deploy dpub-aria and -aam.

https://github.com/w3c/aria/actions/runs/12282036013, https://github.com/w3c/aria/actions/runs/12282036027

Please sign in to comment.