Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/roleInfo.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
name: roleInfo update

on:
push:
workflow_run:
workflows:
- aria
types:
- completed
branches:
- gh-pages
- main

concurrency:
group: roleinfo-update
queue: max

jobs:
roleInfo:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
env:
PUPPETEER_EXECUTABLE_PATH: '/usr/bin/google-chrome'
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: main
fetch-depth: 0 # Needed to compare with origin/main
Expand All @@ -22,13 +31,19 @@ jobs:
with:
node-version: "lts/*"
- run: npm i linkedom prettier@3.6.0
- run: git checkout gh-pages index.html # checkout (respec'ed) aria spec from gh-pages (WARNING: changes get staged!)
- run: git checkout origin/gh-pages -- index.html # checkout (respec'ed) aria spec from gh-pages (WARNING: changes get staged!)
- run: node ./common/script/buildRoleInfo.js # build roleInfo.js
- run: npx prettier --write --print-width 200 ./common/script/roleInfo.js
- run: git reset index.html # reset spec source (to avoid comittting, cf. warning above)
- run: git config user.name "github-actions[bot]"
- run: git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: git add ./common/script/roleInfo.js
- run: |
git diff-index --quiet HEAD ./common/script/roleInfo.js || git commit -m'chore: update roleInfo.js'
- run: git push
- run: git checkout HEAD -- index.html # restore spec source cleanly
- name: Commit and push roleInfo
run: |
if git diff --quiet -- ./common/script/roleInfo.js; then
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add ./common/script/roleInfo.js
git commit -m "chore: update roleInfo.js"
git pull --rebase origin main
git push origin HEAD:main
4 changes: 3 additions & 1 deletion common/script/aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ const renderIndexEntry = (indexTest, rdef) => {
if (!isAbstract && roleFromNode) {
const content = rdef.innerText;
const isRequired = roleFromNode.closest("table").querySelector(".role-namerequired")?.innerText === "True";
if (roleFromNode.textContent.indexOf(indexTest) !== -1) return `<li><a href="#${content}" class="role-reference"><code>${content}</code></a>${isRequired ? " (name required)" : ""}</li>`; // TODO: `textContent.indexOf` feels brittle; right now it's either the exact string or proper list markup with LI with exact string
if (!roleFromNode.innerHTML.includes(indexTest)) return; // NOTE: it's either the exact string or contains LI with exact string. TODO: feels brittle. e.g. adding data-${indexTest} for selector may be better.
const synonymRoles = [...container.querySelectorAll("[data-role-synonyms] rref")].map((node) => node.outerHTML);
return `<li><a href="#${content}" class="role-reference"><code>${content}</code></a>${isRequired ? " (name required)" : ""}${synonymRoles.length > 0 ? ` (synonymous: ${synonymRoles.join(", ")})` : ""}</li>`;
}
};

Expand Down
3 changes: 3 additions & 0 deletions common/script/buildRoleInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const generateRoleInfoEntry = (roleSection) => {
value.fragID = key; //TODO: [minor] is this duplication really worth it? Role names should be valid IDREFS, no?
value.parentRoles = [];
roleSection.querySelectorAll(".role-parent .role-reference").forEach((node) => value.parentRoles.push(node.textContent));
let synonymRoles = [];
roleSection.querySelectorAll("[data-role-synonyms] .role-reference").forEach((node) => synonymRoles.push(node.textContent));
if (synonymRoles.length > 0) value.synonymRoles = synonymRoles;
value.localprops = [];

roleSection.querySelectorAll(":is(.role-required-properties, .role-properties, .role-disallowed) :is(.property-reference, .state-reference)").forEach((link) => {
Expand Down
86 changes: 30 additions & 56 deletions common/script/roleInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6543,6 +6543,7 @@
name: "image",
fragID: "image",
parentRoles: ["section"],
synonymRoles: ["img"],
localprops: [],
allprops: [
{
Expand Down Expand Up @@ -10444,6 +10445,7 @@
name: "none",
fragID: "none",
parentRoles: ["structure"],
synonymRoles: ["presentation"],
localprops: [
{
is: "property",
Expand Down Expand Up @@ -13428,20 +13430,6 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
],
allprops: [
{
Expand All @@ -13465,20 +13453,6 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-atomic",
Expand Down Expand Up @@ -13640,6 +13614,20 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuetext",
Expand Down Expand Up @@ -15246,20 +15234,6 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
],
allprops: [
{
Expand Down Expand Up @@ -15304,20 +15278,6 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-atomic",
Expand Down Expand Up @@ -15465,6 +15425,20 @@
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemax",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuemin",
required: false,
disallowed: false,
deprecated: false,
},
{
is: "property",
name: "aria-valuetext",
Expand Down
4 changes: 2 additions & 2 deletions core-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12641,7 +12641,7 @@ <h4 id="arianotifymixin-map-arianotify">ariaNotify</h4>
fallback nodes are not exposed to or detectable by web content and this behavior is not required.
</p>
</section>
<section>
<section id="privacy-considerations">
<h2>Privacy considerations</h2>
<p>
In accordance with <a href="https://w3ctag.github.io/design-principles/#do-not-expose-use-of-assistive-tech">Web Platform Design Principles</a>, this specification provides no programmatic
Expand All @@ -12651,7 +12651,7 @@ <h2>Privacy considerations</h2>
<a href="https://www.w3.org/TR/fingerprinting-guidance/#active-0">active fingerprinting</a> of users of Assistive Technologies.
</p>
</section>
<section>
<section id="security-considerations">
<h2>Security considerations</h2>
<p>This specification introduces no new security considerations.</p>
</section>
Expand Down
4 changes: 2 additions & 2 deletions dpub-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2612,12 +2612,12 @@ <h2>Events</h2>
<a class="core=mappings" data-cite="core-aam-1.1#mapping_events">Events</a> mappings.
</p>
</section>
<section class="informative">
<section class="informative" id="security-considerations">
<h2>Security Considerations</h2>

<p>This specification introduces no new security considerations.</p>
</section>
<section class="informative">
<section class="informative" id="privacy-considerations">
<h2>Privacy Considerations</h2>

<p>
Expand Down
4 changes: 2 additions & 2 deletions dpub-aria/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4413,12 +4413,12 @@ <h3>Definition of Roles</h3>
</div>
</section>
</section>
<section class="informative">
<section class="informative" id="security-considerations">
<h2>Security Considerations</h2>

<p>This specification introduces no new security considerations.</p>
</section>
<section class="informative">
<section class="informative" id="privacy-considerations">
<h2>Privacy Considerations</h2>

<p>
Expand Down
6 changes: 3 additions & 3 deletions graphics-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ <h4 id="role-map-graphics-document"><code>graphics-document</code></h4>
</td>
</tr>
<tr>
<th><a href="https://w3c.github.io/core-aam/#roleMappingComputedRole">Computed Role</a></th>
<th>[[[core-aam#roleMappingComputedRole|Computed Role]]]</th>
<td>
<code>graphics-document</code>
</td>
Expand Down Expand Up @@ -371,7 +371,7 @@ <h4 id="role-map-graphics-object"><code>graphics-object</code></h4>
</td>
</tr>
<tr>
<th><a href="https://w3c.github.io/core-aam/#roleMappingComputedRole">Computed Role</a></th>
<th>[[[core-aam#roleMappingComputedRole|Computed Role]]]</th>
<td>
<code>graphics-object</code>
</td>
Expand Down Expand Up @@ -413,7 +413,7 @@ <h4 id="role-map-graphics-symbol"><code>graphics-symbol</code></h4>
</td>
</tr>
<tr>
<th><a href="https://w3c.github.io/core-aam/#roleMappingComputedRole">Computed Role</a></th>
<th>[[[core-aam#roleMappingComputedRole|Computed Role]]]</th>
<td>
<code>graphics-symbol</code>
</td>
Expand Down
4 changes: 2 additions & 2 deletions html-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17038,7 +17038,7 @@ <h3>Accessible Description Computation</h3>
frameset - https://html.spec.whatwg.org/multipage/obsolete.html#frames

-->
<section>
<section id="privacy-considerations">
<h2>Privacy considerations</h2>
<p>
In accordance with <a href="https://w3ctag.github.io/design-principles/#do-not-expose-use-of-assistive-tech">Web Platform Design Principles</a>, this specification provides no programmatic
Expand All @@ -17048,7 +17048,7 @@ <h2>Privacy considerations</h2>
<a href="https://www.w3.org/TR/fingerprinting-guidance/#active-0">active fingerprinting</a> of users of Assistive Technologies.
</p>
</section>
<section>
<section id="security-considerations">
<h2>Security considerations</h2>
<p>This specification introduces no new security considerations.</p>
</section>
Expand Down
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5010,6 +5010,10 @@ <h2>Definition of Roles</h2>
<th class="role-presentational-inherited-head" scope="row">Inherits Presentational:</th>
<td class="role-presentational-inherited">Β </td>
</tr>
<tr>
<th scope="row">Synonym roles</th>
<td data-role-synonyms=""><rref>img</rref></td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -7121,6 +7125,10 @@ <h5>Presentational Role Inheritance</h5>
<th class="role-presentational-inherited-head" scope="row">Inherits Presentational:</th>
<td class="role-presentational-inherited">Β </td>
</tr>
<tr>
<th scope="row">Synonym roles</th>
<td data-role-synonyms=""><rref>presentation</rref></td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -17248,11 +17256,11 @@ <h2>Example IDL Attribute Usage</h2>
</aside>
</section>
</section>
<section class="informative">
<section class="informative" id="security-considerations">
<h2>Security Considerations</h2>
<p>This specification introduces no new security considerations.</p>
</section>
<section class="informative">
<section class="informative" id="privacy-considerations">
<h2>Privacy Considerations</h2>
<p>
In accordance with <a data-cite="design-principles#do-not-expose-use-of-assistive-tech">Web Platform Design Principles</a>, this specification provides no programmatic interface to determine
Expand Down
4 changes: 2 additions & 2 deletions pdf-aam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1082,11 +1082,11 @@ <h2>Actions</h2>
</section>
</section>

<section>
<section id="privacy-considerations">
<h2>Privacy considerations</h2>
<p>TBD. Should we duplicate or cross-reference this content from the corresponding Core-AAM section?</p>
</section>
<section>
<section id="security-considerations">
<h2>Security considerations</h2>
<p>This specification introduces no new security considerations.</p>
</section>
Expand Down
Loading