├── CODEOWNERS
├── .gitignore
├── examples
├── arianotify-polyfill.js
├── kanban
│ ├── arianotify-polyfill.js
│ └── index.html
├── suggested-text
│ ├── arianotify-polyfill.js
│ └── index.html
└── index.html
├── tests
├── web-test-runner
│ ├── arianotify-polyfill.js
│ ├── live-region-placement-body.test.html
│ ├── live-region-placement-dialog-role.test.html
│ ├── live-region-placement-dialog.test.html
│ └── arianotify-polyfill.test.js
└── guidepup
│ ├── voiceover.spec.mjs
│ └── nvda.spec.mjs
├── .github
└── workflows
│ ├── test.yml
│ ├── publish.yml
│ └── static.yml
├── playwright.config.mjs
├── SUPPORT.md
├── package.json
├── web-test-runner.config.js
├── LICENSE
├── CONTRIBUTING.md
├── SECURITY.md
├── README.md
├── CODE_OF_CONDUCT.md
└── arianotify-polyfill.js
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @github/accessibility-reviewers
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | test-results
3 | coverage
--------------------------------------------------------------------------------
/examples/arianotify-polyfill.js:
--------------------------------------------------------------------------------
1 | ../arianotify-polyfill.js
--------------------------------------------------------------------------------
/examples/kanban/arianotify-polyfill.js:
--------------------------------------------------------------------------------
1 | ../../arianotify-polyfill.js
--------------------------------------------------------------------------------
/tests/web-test-runner/arianotify-polyfill.js:
--------------------------------------------------------------------------------
1 | ../../arianotify-polyfill.js
--------------------------------------------------------------------------------
/examples/suggested-text/arianotify-polyfill.js:
--------------------------------------------------------------------------------
1 | ../../arianotify-polyfill.js
--------------------------------------------------------------------------------
/tests/web-test-runner/live-region-placement-body.test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/tests/web-test-runner/live-region-placement-dialog-role.test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tests/web-test-runner/live-region-placement-dialog.test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test
2 |
3 | on:
4 | workflow_call:
5 | pull_request:
6 |
7 | permissions:
8 | contents: read
9 |
10 | jobs:
11 | test:
12 | name: Test
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - uses: actions/setup-node@v4
17 | with:
18 | node-version: 22
19 | - run: npm ci
20 | - run: npm test
21 |
--------------------------------------------------------------------------------
/playwright.config.mjs:
--------------------------------------------------------------------------------
1 | import { screenReaderConfig } from "@guidepup/playwright";
2 | import { devices } from "@playwright/test";
3 | import * as url from "node:url";
4 |
5 | const config = {
6 | ...screenReaderConfig,
7 | reportSlowTests: null,
8 | timeout: 3 * 60 * 1000,
9 | retries: 0,
10 | projects: [
11 | {
12 | name: "Microsoft Edge",
13 | use: {
14 | ...devices["Desktop Edge"],
15 | channel: "msedge",
16 | },
17 | },
18 | ],
19 | quiet: false,
20 | };
21 |
22 | export default config;
23 |
--------------------------------------------------------------------------------
/tests/web-test-runner/arianotify-polyfill.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from "@esm-bundle/chai";
2 |
3 | export async function tests() {
4 | describe("ariaNotify polyfill", () => {
5 | it(" placement", () => {
6 | let count = 0;
7 | for (const container of document.querySelectorAll("[data-should-contain-live-region]")) {
8 | container.ariaNotify("Hello, world!");
9 | const liveRegion = Array.from(container.childNodes).find((node) => node.nodeType === Node.ELEMENT_NODE && node.tagName.match(/^live-region/i));
10 | expect(liveRegion).to.not.be.undefined;
11 | count++;
12 | }
13 | expect(count).to.be.above(0);
14 | });
15 | });
16 | }
--------------------------------------------------------------------------------
/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # Support
2 |
3 | ## How to file issues and get help
4 |
5 | This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.
6 |
7 | For help or questions about using this project, please reach out [on the discussions page](https://github.com/github/arianotify-polyfill/discussions).
8 |
9 | arianotify-polyfill is under active development and maintained by GitHub staff **AND THE COMMUNITY**. We will do our best to respond to support, feature requests, and community questions in a timely manner.
10 |
11 | ## GitHub Support Policy
12 |
13 | Support for this project is limited to the resources listed above.
14 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | release:
5 | types: [created]
6 |
7 | permissions:
8 | contents: read
9 | id-token: write
10 |
11 | jobs:
12 | test:
13 | name: Test
14 | uses: github/arianotify-polyfill/.github/workflows/test.yml@main
15 | secrets: inherit
16 | publish-npm:
17 | needs: [test]
18 | name: Publish to npm
19 | runs-on: ubuntu-latest
20 | steps:
21 | - uses: actions/checkout@v4
22 | - uses: actions/setup-node@v4
23 | with:
24 | node-version: 22
25 | registry-url: https://registry.npmjs.org/
26 | cache: npm
27 | - run: npm ci
28 | - run: npm version ${TAG_NAME} --git-tag-version=false
29 | env:
30 | TAG_NAME: ${{ github.event.release.tag_name }}
31 | - run: npm whoami; npm --ignore-scripts publish --provenance --access public
32 | env:
33 | NODE_AUTH_TOKEN: ${{secrets.npm_token}}
34 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@github/arianotify-polyfill",
3 | "version": "0.0.0-development",
4 | "description": "Polyfill for the ARIA Notification API",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/github/arianotify-polyfill.git"
8 | },
9 | "keywords": [],
10 | "license": "MIT",
11 | "author": "GitHub Inc.",
12 | "main": "arianotify-polyfill.js",
13 | "module": "arianotify-polyfill.js",
14 | "type": "module",
15 | "directories": {
16 | "example": "examples"
17 | },
18 | "files": [],
19 | "scripts": {
20 | "test": "npx playwright install firefox && web-test-runner",
21 | "test:guidepup": "npx playwright test"
22 | },
23 | "devDependencies": {
24 | "@esm-bundle/chai": "^4.3.4-fix.0",
25 | "@guidepup/guidepup": "^0.24.0",
26 | "@guidepup/playwright": "^0.14.1",
27 | "@playwright/test": "^1.48.0",
28 | "@web/test-runner": "^0.20.1",
29 | "@web/test-runner-playwright": "^0.11.1"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/web-test-runner.config.js:
--------------------------------------------------------------------------------
1 | import { playwrightLauncher } from '@web/test-runner-playwright';
2 |
3 | export default {
4 | files: "tests/web-test-runner/*.test.html",
5 | coverage: true,
6 | nodeResolve: true,
7 | browsers: [
8 | playwrightLauncher({
9 | product: 'firefox', // Use Firefox instead of Chrome (web-test-runner’s default), because Firefox doesn’t have a native implementation of 'ariaNotify' (as of 2025-11-07), so we can test the polyfill in it.
10 | launchOptions: { headless: true }
11 | }),
12 | ],
13 | plugins: [
14 | {
15 | name: "include-polyfill",
16 | transform(context) {
17 | if (context.response.is("html")) {
18 | return context.body.replace(
19 | /<\/body>/,
20 | `
21 |
22 |
27 |