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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gtfs-accessibility-validator

v0.2.6

Published

Test GTFS for accessibility information

Downloads

81

Readme

gtfs-accessibility-validator checks transit data in GTFS format for fields and files related to accessibility.

It checks for:

  • wheelchair_accessible field in trips.txt
  • wheelchair_boarding field in stops.txt
  • tts_stop_name field in stops.txt
  • levels.txt file
  • pathways.txt file
  • Contrast ratio between route_color and route_text_color in routes.txt

These accessibility guidelines are taken from the California Transit Data Guidelines published by Caltrans.

:bulb: Hosted Web Version Available: A web-based version of this validator is available at https://validator.blinktag.com

Example output from GTFS Accessibility Validator

wheelchair_accessible field in trips.txt

Guideline: The wheelchair_boarding field has a valid, non-empty, and non-null value for every entry in the stops.txt file.

Transit riders with wheelchairs and other mobility aids encounter distinct challenges in accessing transit, including uncertainty as to whether they can board and alight at particular locations using their devices.

Transit providers should support the ability of these riders to plan and take trips on transit by publishing information about the locations where wheelchair users can and cannot access the system in trip-planning applications.

wheelchair_boarding field in stops.txt

Guideline: The wheelchair_accessible field has a valid, non-empty, and non-null value for every entry in the trips.txt file.

Transit riders with wheelchairs and other mobility aids encounter distinct challenges in accessing transit, including the uncertainty as to whether their devices can be used on specific scheduled trips.

Transit providers should support the ability of these riders to plan and take trips on transit by publishing information about the trips on which wheelchair users may or may not be able to travel in trip-planning applications.

tts_stop_name field in stops.txt

Guideline: The tts_stop_name field should include correct pronunciation for all stop names in stops.txt that are commonly mispronounced in trip-planning applications.

Audio annunciation of stop names is an important wayfinding tool for transit riders with visual impairments.

Transit providers should support the ability of these riders to conveniently and accurately plan and take trips on transit by ensuring that stop names will be pronounced correctly in trip-planning applications.

BlinkTag created a different open source tool to review GTFS stop name pronunciations and determine which stops need a tts_stop_name value. See GTFS Text-to-Speech Tester.

levels.txt and pathways.txt files

Guideline: Sufficient data is included within stops.txt, pathways.txt, and levels.txt to navigate to, from, and between any boarding zone to street level with varying physical abilities, including pathway_mode and stair_count where applicable. This includes but is not limited to any stops that use parent_station in stops.txt as well as all significant or named transit facilities where an infrequent visitor may be concerned about accessibility.

Transit riders with wheelchairs and other mobility aids encounter distinct challenges in accessing transit, including uncertainty about navigating between boarding zones and street level at stops.

Transit providers should support the ability of these riders to plan and take trips on transit by providing sufficient information for them to find accessible paths on and off transit using mobile applications.

Contrast ratio between route_color and route_text_color in routes.txt

Guideline: WCAG AA Large Text Contrast

Routes are often identified using the route_color field in routes.txt. Often, the route_short_name is used as text on top of the route_color using the route_text_color.

Installation

If you would like to use this library as a command-line utility, you can install it globally directly from npm:

npm install gtfs-accessibility-validator -g

Or you can use it directly via npx:

npx gtfs-accessibility-validator --gtfsUrl https://agency.com/gtfs.zip

If you are using this as a node module as part of an application, you can include it in your project's package.json file.

Quick Start

There are three ways to use the Accessibility Validator: the web-based version, as a command-line utility, or as part of a node.js app.

Command-line example

Run via npx:

npx gtfs-accessibility-validator --gtfsPath /path/to/your/gtfs

npx gtfs-accessibility-validator --gtfsUrl https://agency.com/gtfs.zip

If installed globally:

gtfs-accessibility-validator --gtfsPath /path/to/your/gtfs

gtfs-accessibility-validator --gtfsUrl https://agency.com/gtfs.zip

Code example

import gtfsAccessibilityValidator from 'gtfs-accessibility-validator';

const config = {
  gtfsPath: '/path/to/gtfs'
}

gtfsAccessibilityValidator(config)
  .then((outputStatus) => {
    console.log(outputStats);
  })
  .catch((err) => {
    console.error(err);
  });

Running

To validate GTFS accessibility, run gtfs-accessibility-validator.

gtfs-accessibility-validator --gtfsPath /path/to/your/gtfs.zip

Options

gtfsPath

Specify a local path to GTFS, either zipped or unzipped.

gtfs-accessibility-validator --gtfsPath /path/to/your/gtfs.zip

or

gtfs-accessibility-validator --gtfsPath /path/to/your/unzipped/gtfs

gtfsUrl

Specify a URL to a zipped GTFS file.

gtfs-accessibility-validator --gtfsUrl http://www.bart.gov/dev/schedules/google_transit.zip

skipImport

Skips importing GTFS into SQLite. Useful if you are rerunning with an unchanged GTFS file. If you use this option and the GTFS file hasn't been imported or you don't have an sqlitePath to a non-in-memory database, you'll get an error.

gtfs-accessibility-validator --skipImport

Contributing

Pull requests are welcome, as is feedback and reporting issues.