Rx11y (pronounced "Rx-ally") is a lightweight library and backend service designed to enhance the accessibility of reactive forms and provide automated accessibility testing via API endpoints. This project includes an Express.js backend with Firestore integration and Docker support.
- Automatic
aria-describedby: Seamlessly links form controls to their error messages, providing screen readers with crucial context. aria-labelledbyfor complex labels: Simplifies associating controls with multiple label elements.- Dynamic
aria-liveregions: Manages the announcement of form validation changes to assistive technologies. - Type-safe API: Built with TypeScript for a robust and predictable development experience.
- Minimalistic and performant: Designed to be lightweight and not impact application performance.
- REST API for Accessibility Testing: Run accessibility tests and store results in Firestore.
Clone the repository and install dependencies:
npm install-
Firebase Setup:
- Go to firebase projects, create a new project or select an existing one then project settings.
- sevice accounts > create service account >
Generate new private key. - Create a Firebase project and generate a service account key (
servicekey.json). - Place
servicekey.jsonin the project root.
-
Start the server:
node server.js # or npm startThe server will run on
http://localhost:8080by default.
docker build -t rx11y-backend .docker run -p 8080:8080 rx11y-backend-
The Dockerfile is ready for Cloud Run. Deploy using:
gcloud run deploy --source . -
Cloud Run will use Workload Identity for authentication; no key file is needed in the image.
All endpoints are prefixed with /api.
Test Firestore connectivity.
- Response:
{ success, message, documentId }
Run a Pa11y accessibility test and save the report to Firestore.
- Body:
{ url: string, testId: string } - Response:
{ testId, summary: { total, errors, warnings, notices } }
Get a list of local JSON reports (from the reports directory).
- Response:
Array<ReportSummary>
Get a specific local JSON report by ID.
- Response:
Report
Generate and update modified HTML for a test by testId.
- Body:
{ testId: string } - Response:
{ success, message, testId, modifiedHtml }
PORT(optional): Port to run the server (default: 5000)GOOGLE_APPLICATION_CREDENTIALS(optional for local): Path to your Firebase service account key
MIT