Skip to content

Commit

Permalink
Merge branch 'main' into issu104
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-montalvo authored May 10, 2024
2 parents 30d0894 + 058f08f commit caf8e9e
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 156 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- repo: w3c/svg-aam
branch: main
- repo: w3c/html-aam
branch: gh-pages
branch: aria-common-sync

steps:
- uses: actions/checkout@v3
Expand Down
148 changes: 0 additions & 148 deletions acknowledgements/aria-contributors.html

This file was deleted.

12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions script/participants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
function getParticipants() {
// Define the W3C's group ID
const GROUP_ID = "83726";

// Define the base URL for the API, using the group ID
const BASE_URL = `https://api.w3.org/groups/${GROUP_ID}`;

// 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 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 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/");

// Fetch the JSON data from the response
const affiliations = await response.json();

// Extract the title of the first affiliation
const affiliation = affiliations._links.affiliations[0].title;

// 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 li = document.createElement("li");
li.textContent = `${user.title} (${user.affiliation})`;
usersList.appendChild(li);
}
}

insertUsersInfoIntoDocument();
}
2 changes: 1 addition & 1 deletion terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dd>
<p>The action taken when an <a>event</a>, typically initiated by users through an input device, causes an element to fulfill a defined role. The role may be defined for that element by the host language, or by author-defined variables, or both. The role for any given element may be a generic action, or may be unique to that element. For example, the activation behavior of an <abbr title="Hypertext Markup Language">HTML</abbr> or <abbr title="Scalable Vector Graphics">SVG</abbr> <code>&lt;a&gt;</code> element shall be to cause the user agent to traverse the link specified in the <code>href</code> attribute, with the further optional parameter of specifying the browsing context for the traversal (such as the current window or tab, a named window, or a new window); the activation behavior of an <abbr title="Hypertext Markup Language">HTML</abbr> <code>&lt;input&gt;</code> element with the <code>type</code> attribute value <code>submit</code> shall be to send the values of the form elements to an author-defined <abbr title="Internationalized Resource Identifiers">IRI</abbr> by the author-defined <abbr title="Hypertext Transfer Protocol">HTTP</abbr> method.</p>
</dd>
<dt><dfn data-lt="assistive technology">Assistive Technologies</dfn></dt>
<dt><dfn data-lt="assistive technologies|assistive technology">Assistive Technologies</dfn></dt>
<dd><p>Hardware and/or software that:</p>
<ul>
<li>relies on services provided by a <a>user agent</a> to retrieve and render Web content </li>
Expand Down

0 comments on commit caf8e9e

Please sign in to comment.