npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bstack-a11y-automation-report

v1.0.1

Published

Generate accessibility reports from BrowserStack TestHub builds

Downloads

6

Readme

BrowserStack Accessibility Report Generator

A Node.js package to generate accessibility reports from BrowserStack Accessibility Automation Runs. This tool fetches accessibility test results and generates a comprehensive PDF report with detailed insights into accessibility issues and WCAG violations.

Prerequisites

  • Node.js >= 18
  • A BrowserStack account and access to BrowserStack Accessibility Automation

Installation

npm install bstack-a11y-automation-report

Configuration

You need to provide your BrowserStack credentials and Testhub build ID. This can be done in two ways:

1. Environment Variables

export BROWSERSTACK_USERNAME="your_username"
export BROWSERSTACK_ACCESS_KEY="your_access_key"
export TESTHUB_BUILD_ID="your_build_id"

2. YAML Configuration

Create a file named accessibility_report.yml in your project root:

userName: your_username
accessKey: your_access_key
buildId: your_build_id

Note: Environment variables take precedence over YAML configuration.

Usage

Command Line

npx generate-accessibility-report

Programmatic Usage

const { generateAccessibilityReport } = require('browserstack-accessibility-report');

async function main() {
  try {
    const result = await generateAccessibilityReport();
    if (result.success) {
      console.log('Report generated successfully!');
    } else {
      console.error('Error:', result.message);
    }
  } catch (error) {
    console.error('Unexpected error:', error.message);
  }
}

main();

Output

The tool generates:

  1. A PDF report containing:
    • Executive summary
    • Detailed accessibility issues with severity levels
    • WCAG compliance statistics
    • Test environment details
  2. A temporary CSV file (automatically cleaned up after PDF generation)

Troubleshooting

Common Issues

  1. Authentication Errors

    • Verify your BrowserStack credentials
    • Ensure environment variables are properly set
    • Check YAML configuration file permissions
  2. Build ID Issues

    • Get the TestHub build ID from console or browserstack.debug.log file
    • Ensure the build has completed running
    • Verify accessibility tests were included in the build
  3. PDF Generation Errors

    • Ensure Node.js version is 18 or higher (PDF generation may fail with lower versions)
    • Check system memory availability
    • Ensure write permissions in the output directory
    • Verify Puppeteer installation
  4. Configuration File Not Found

    • Ensure you are in the correct directory when executing the test command
    • The accessibility_report.yml file should be present at the root of your project
    • Verify the YAML file has the correct permissions

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Please ensure your PR includes:

  • Detailed description of changes
  • Updated tests if applicable
  • Updated documentation

License

MIT

Support

For support, please:

  1. Check the troubleshooting guide
  2. Open an issue on GitHub
  3. Contact BrowserStack support for account-related issues