Functionality was moved into SvelteKit: https://github.com/mandrasch/screenreadthis
Retrieve the accessibility tree for URLs via simple API call, made possible via Accessibility.snapshot() by Puppeteer. Server implemented via express.
Created for ScreenreadThis!-experiment.
- Call via
/?getA11yTree?url=<ENCODED_URL> - Example request:
/getA11yTree?url=https%3A%2F%2Fwww.a11yproject.com%2F
Demo: https://screenreadthis-api-server.onrender.com/getA11yTree?url=https%3A%2F%2Fwww.a11yproject.com%2F (can take a minute or two)
! This demo runs on a limited resources cloud hosting, only use it for testing please. !
You can host this API server yourself:
- https://render.com/docs/deploy-node-express-app (use
npm installandnpm startas commands) - https://ploi.io/news/nodejs-support-is-here (Currently not working
# supervisor error output
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at endReadableNT (node:internal/streams/readable:1345:12)
at Socket.emit (node:events:539:35)
at Socket.onend (node:readline:277:10)
at Interface.close (node:readline:586:8)
at Interface.emit (node:events:539:35)
at Interface.<anonymous> (/home/ploi/screenreadthis-api-server.mandrasch.eu/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:278:24)
at onClose (/home/ploi/screenreadthis-api-server.mandrasch.eu/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:290:20)
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
/home/ploi/screenreadthis-api-server.mandrasch.eu/node_modules/puppeteer/.local-chromium/linux-1036745/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
Error: Failed to launch the browser process!
- https://cleavr.io/nodejs/ (not tested yet)
- https://www.mittwald.de/hosting-addons/nodejs (not tested yet)
npm install
npm run dev
# this will call NODE_ENV=production node server.js
npm start
https://screenreadthis-api-server.onrender.com is hosted on european Cloud Instances via render.com, see https://render.com/privacy for more information. Contact information / imprint: https://matthias-andrasch.eu/blog/impressum-datenschutz/
Feel free to fork / re-use this for your own purpose! My own source code is provided as CC0/Public Domain, see package.json for open source packages used and their respective licenses.