Remediate issues in pull requests
Scan pull requests for accessibility issues with the BrowserStack Accessibility DevTools GitHub App and get findings posted directly on the pull request.
The BrowserStack Accessibility DevTools GitHub App scans the changed code on every pull request and posts the accessibility issues to the PRs. The app posts a summary comment, inline comments on the affected lines, a check run, and a SARIF (Static Analysis Results Interchange Format) upload to the GitHub code scanning Security tab.
Prerequisites
You need:
- Access to install GitHub Apps on your GitHub organization or repository.
- A BrowserStack Service Account username and access key.
- A GitHub repository where pull requests trigger Actions workflows.
Set up remediation in your pull requests
Setting this up takes three steps: install the app, add your credentials as secrets, and add the workflow file to your repository.
Install the BrowserStack Accessibility DevTools GitHub App
Install the BrowserStack Accessibility DevTools GitHub App on your organization or repository.
Add your Service Account credentials as secrets
In your repository or organization settings, add your BrowserStack Service Account credentials as Actions secrets:
BROWSERSTACK_USERNAMEBROWSERSTACK_ACCESS_KEY
Find these credentials on the account profile page of your Service Account. Note that this is different from your individual BrowserStack credentials.
Add the workflow file
Add this to .github/workflows/browserstack-a11y.yml in your repository:
It runs on every push to a pull request (opened, updated, reopened, or marked ready for review). Comment @AccessibilityDevTools on the pull request to re-run it on demand.
How it works
A pull request, or a comment mentioning @AccessibilityDevTools, triggers the workflow. It runs the CLI against the pull request’s changed files, authenticated with your Service Account credentials. The app posts the results back to the pull request.
The id-token: write permission lets GitHub mint a short-lived, repo-scoped OpenID Connect token proving the run came from your repository’s CI. BrowserStack verifies it before posting anything. It carries no personal identity and grants no standing access.
What gets posted to your pull request
Every scan adds:
- A sticky summary comment per pull request.
- Inline comments on the offending lines, formatted the same way as the BrowserStack VS Code extension: the rule name and description, followed by how to fix it.
- A check run with the pass or fail result.
- A SARIF upload to the GitHub code scanning Security tab.
Inputs
The action takes these inputs:
| Input | Default | Description |
|---|---|---|
username |
None | BrowserStack Service Account username. Store it as an encrypted Actions secret. |
access-key |
None | BrowserStack Service Account access key. Store it as an encrypted Actions secret. |
fail-on-severity |
error |
Severity at or above which the check fails the run: error, warning, or none. none reports findings without ever failing the run. |
ai-agent |
None | Bare name of an AI agent to mention for AI remediation hand-off. |
Outputs
It returns these outputs:
| Output | Description |
|---|---|
result |
pass or fail. |
error-count |
Number of error-severity findings. |
warning-count |
Number of warning-severity findings. |
findings-count |
Total number of findings. |
comment-url |
Link to the posted pull request summary comment. |
Get AI-assisted fixes on your findings
Set the ai-agent input to the name of an AI agent you already use, for example coderabbitai. When the app posts findings, it mentions this agent on the comment, and the agent applies fixes under your own credentials and billing.
This only works if your AI agent accepts triggers from a bot or app comment. Support varies by agent, and mentioning one that doesn’t accept it is a silent no-op.
Related links
- BrowserStack Accessibility DevTools - GitHub Marketplace
- BrowserStack Accessibility DevTools - GitHub Actions Marketplace
- Configure rule-level severity
- Lint custom components
- Accessibility DevTools overview
- BrowserStack Accessibility DevTools GitHub Action source
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!