Skip to content

editorial: [aria.js] generate roleInfo after respec runs#2769

Open
pkra wants to merge 2 commits intomainfrom
ariajs20260419
Open

editorial: [aria.js] generate roleInfo after respec runs#2769
pkra wants to merge 2 commits intomainfrom
ariajs20260419

Conversation

@pkra
Copy link
Copy Markdown
Member

@pkra pkra commented Apr 19, 2026

🚀 Netlify Preview:
🔄 this PR updates the following sspecs:

Rewrites buildRoleInfo.js to make it independent of aria.js by using the compiled specification (after respec runs). Note: adds several hacks to keep bugs alive (to simplify review).

  • .github/worflows/roleInfo.yml
    • run on gh-pages pushes (to get latest respec result)
    • checkout main
    • checkout index.html from gh-pages (to get latest respec result)
    • simplify buildRoleInfo.js call
    • add reset of index.html
  • .github/workflows/roleInfoCheck.yml
    • simplify buildRoleInfo.js call
  • common/script/ariaPreprocessing.js
    • duplicate prohibited and deprecated status for global properties on list items to preserve it after resolveReferences removes *ref elements.
  • common/script/buildRoleInfo.js
    • complete rewrite to run independently from aria.js
    • collects states&props
    • loops through role sections and processes the characteristics tables
    • NOTE: several hacks to recreate bugs (to simplify review)
  • common/script/roleInfo.js
    • regenerate for review
    • all changes are either
      • removal of duplicates
      • change of position

Part of #2501

Rewrites buildRoleInfo.js to make it independent of aria.js
by using the "compiled" specification (after respec runs).
Note: adds several hacks to keep bugs alive (to simplify review).

- .github/worflows/roleInfo.yml
  - run on gh-pages pushes (to get latest respec result)
  - checkout main
  - checkout index.html from gh-pages (to get latest respec result)
  - simplify buildRoleInfo.js call
  - add reset of index.html
- common/script/ariaPreprocessing.js
  - duplicate prohibited and deprecated status for global properties
     on list items to preserve it after resolveReferences removes
      *ref elements.
- common/script/buildRoleInfo.js
  - complete rewrite to run independently from aria.js
  - collects states&props
  - loops through role sections and processes the characteristics tables
  - NOTE: several hacks to recreate bugs (to simplify review)
- common/script/roleInfo.js
  - regenerate for review
  - all changes are either
    - removal of duplicates
    - change of position

Part of #2501
@pkra pkra added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Apr 19, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 19, 2026

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 89fe951
🔍 Latest deploy log https://app.netlify.com/projects/wai-aria/deploys/69e5cf3c047ce40008d76cf6
😎 Deploy Preview https://deploy-preview-2769--wai-aria.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkra pkra mentioned this pull request Apr 19, 2026
28 tasks
@pkra pkra marked this pull request as ready for review April 19, 2026 18:31
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 19, 2026

🚀 Deployed on https://deploy-preview-2769--wai-aria.netlify.app

@github-actions github-actions Bot temporarily deployed to pull request April 19, 2026 18:31 Inactive
push:
branches:
- main
- gh-pages
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know how to test this without merging. Also, this may help with or may be blocked by #2768.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only way would be through setting up a fork

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought this is the cleanest way: when a version is published to github, we update roleinfo.

Comment thread common/script/roleInfo.js
@@ -862,13 +862,6 @@
disallowed: false,
deprecated: false,
},
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This diff is worse than my local diff was. Reviewers may want to try to paste this version into their local editor for diffing.

There are a few simple de-duplications as well as a few larger groups (gridcell changes are the most "confusing" part).

Remove output hack after rewrite.
@spectranaut
Copy link
Copy Markdown
Contributor

Hoping to take a look at this next week!

node-version: "latest"
- run: npm i linkedom prettier@3.6.0
- run: node ./common/script/buildRoleInfo.js > ./common/script/roleInfo.js
- run: node ./common/script/buildRoleInfo.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am not clear how this check would work. In PRs you don't have the respec esported spec, previews are built at run time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh! You're right. My brain clearly stopped working at some point.

I'll fix it.

push:
branches:
- main
- gh-pages
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only way would be through setting up a fork

Comment thread common/script/buildRoleInfo.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo spec:aria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants