Skip to content
Merged

Dev #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Automated accessibility checks (axe-core in a real browser, plus keyboard and screen reader behaviour
# checks), run on pushes to dev and on pull requests into main. See tests/accessibility/check.mjs.
# checks), and simulated walks with live directions, run on pushes to dev and on pull requests into main. See
# tests/accessibility/check.mjs and walks.mjs.
# This only checks the site; it doesn't change what's deployed. To block merging when it fails, make it a
# required check in the repository's branch protection settings for main.
name: Accessibility checks
Expand Down Expand Up @@ -36,3 +37,8 @@ jobs:

- name: Check accessibility
run: npm run check

# Live walking directions on the move: GPS fixes fed along routes (a normal walk, a wrong turn, poor signal,
# a shuttle ride). See tests/accessibility/walks.mjs.
- name: Simulated walks
run: npm run walks
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
- name: Assemble site
run: |
mkdir _site
cp -R index.html help.html src _site/
cp -R index.html help.html review.html sw.js src _site/
# Browsers keep files for up to 10 minutes, so right after a deploy a returning visitor could get new
# and old files mixed together. Stamp this deploy's version onto the page's scripts and styles, and onto
# the routing modules' imports of each other (directions.js passes its own stamp to the ones it loads).
v="${GITHUB_SHA::8}"
sed -i -E "s#(src|href)=\"(src/[^\"?]+\.(js|css))\"#\1=\"\2?v=$v\"#g" _site/index.html _site/help.html
sed -i -E "s#(src|href)=\"(src/[^\"?]+\.(js|css))\"#\1=\"\2?v=$v\"#g" _site/index.html _site/help.html _site/review.html
sed -i -E "s#from '(\./[^'?]+\.mjs)'#from '\1?v=$v'#g" _site/src/js/routing/*.mjs

- uses: actions/configure-pages@v6
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/routing-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Tests for the routing modules (graph building, routes, step wording, shuttle schedules, slopes), run on pushes to
# dev and on pull requests into main. See tests/routing/. No packages to install.
name: Routing tests

on:
push:
branches: [dev]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
- run: node --test tests/routing/*.test.mjs
67 changes: 66 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,58 @@ This repository contains the script for the [AccessBC](https://bcdigschol.github

This project is a collaborative project between the [BC Digital Scholarship Group](https://ds.bc.edu/), colleagues in Facilities, and feedback from BC's Council for Students with Disabilites. The purpose of this webmap is to make resources around the BC campuses more visible and findable as well as try to help users navigate campus.

## Features at a glance

**Accessible directions**
- Step-free routes on BC's mapped accessible paths, using accessible entrances, indoor routes and elevators
- **Avoid steep slopes** on by default (1:12, the ADA ramp limit), with one tap to turn it off, and an option to limit only uphill or only downhill
- Avoids stairs and footpaths not checked for accessibility (unless you allow them)
- Routes avoid elevators and entrances reported not working, and say so
- Up to five stops on the way, such as a restroom or a lactation room
- Time estimates at your pace (slower, gentle or brisk)

**Walking directions, hands-free**
- One tap to **Start**: follows your location, reads each step aloud, and finds a new route if you go off it
- Clock-face directions from the phone's compass ("at your 2 o'clock"), and **Face the right way** with a tone
- Sounds and vibration for each step, turns and arrival; the screen stays on
- **Where am I?**: the nearest building, your progress, and what's around you
- Works with VoiceOver, TalkBack, NVDA and JAWS, and doesn't talk over your screen reader

**Beyond campus**
- **Between campuses** (Chestnut Hill, Brighton, Newton) and from off campus, on city sidewalks from OpenStreetMap, with every street crossing as a step and whether its curb ramps are confirmed
- **BC shuttles** in routes when they're running and quicker: "take the Newton Eagle Direct to Stuart", with BC's schedules and the next shuttle when none is running
- **MBTA Green Line stations**, with wheelchair accessibility, live elevator and access alerts, and live next-train times
- **Green Line trains in routes** when quicker (walk, train, maybe a shuttle, walk), boarding only at wheelchair-accessible stations when you avoid stairs
- **Plan for later, or arrive by a time**: shuttles and trains are chosen for when you'll travel, and the route says when to leave
- **Avoid crossings without confirmed curb ramps**, an option for wheelchair users off campus

**Finding things**
- One **Where to?** box for buildings, offices and resources inside them, T stations, and kinds of thing
- **Find nearby**: single-stall restrooms, lactation rooms, food, printing, seating, elevators, shuttle stops, T stations and blue-light phones, by walking distance
- **Your places**: saved and recent destinations, one tap away
- Building information: accessible entrances (which side), elevators, and what's nearby

**Safety**
- **Blue light**: one button, always on screen, gives walking directions to the nearest working blue-light emergency phone
- Call BC Police (617-552-4444) and 911 buttons wherever blue lights appear
- A clear in-development notice: live directions aren't yet an assistive device to rely on

**Seeing it your way**
- Dark mode, high contrast, larger text, bigger map symbols, and a large step-by-step view
- Works at 400% zoom, with reduce motion, and fully by keyboard
- Everything on the map is also available as text

**Reliable and shareable**
- **Works offline** after the first visit: the whole map, directions and your places, with no signal
- Add to your home screen like an app
- Share a trip by link, or copy or email the directions as text
- Report a problem (elevator out, door broken, path blocked) from the map, a building, or while walking

**Built to improve**
- Automated accessibility checks (WCAG 2.2 AA) on every change
- Spreadsheets and a volunteer mapping guide to fill the data gaps ([docs/data-collection/](docs/data-collection/))
- A [roadmap](ROADMAP.md) of what's next

## Running locally

The site is plain static files with no build step and no external services. From the repository root, run:
Expand All @@ -15,7 +67,7 @@ python3 scripts/serve.py
Then open http://localhost:8000. Use this script rather than `python3 -m http.server`, which can't serve the
`.pmtiles` basemap and terrain files (they need HTTP Range requests).

## Accessibility features
## Accessibility features in detail

**The interface** works like other map apps: one **Where to?** box (buildings, things in them, or kinds of
thing like single-stall restrooms, with quick buttons and a **More…** list under it), a route preview from your
Expand Down Expand Up @@ -52,6 +104,16 @@ On computers it's a column down the left; on phones a search bar at the top and
read each section (or the whole guide) aloud. Keep it up to date when
features change.

**Routing tests** ([tests/routing/](tests/routing/)) cover the graph builder, routes on the real campus data, step
wording, shuttle schedules and rides, and slopes: `node --test tests/routing/*.test.mjs` (no packages needed). They
run in CI too ([.github/workflows/routing-tests.yml](.github/workflows/routing-tests.yml)).

**Simulated walks** ([tests/accessibility/walks.mjs](tests/accessibility/walks.mjs)) test live walking directions
on the move, feeding GPS fixes along routes: a normal walk, a wrong turn (re-routing), poor signal, and a shuttle ride.
`cd tests/accessibility && npm run walks`, or `npm run walks -- shuttle` for one. **Timings at phone speed**
(`npm run perf`, with the preview server on port 8765) measure the first load, routes, a re-route and Find nearby
with the processor slowed 6x.

**Testing.** Automated accessibility checks run on every push to `dev` and every pull request into `main`
([.github/workflows/accessibility.yml](.github/workflows/accessibility.yml); run them locally with
`cd tests/accessibility && npm ci && npx playwright install chromium && npm run check`). Testing with
Expand All @@ -67,12 +129,15 @@ students and an orientation and mobility instructor is planned in
|---|---|
| `index.html`, `src/js/`, `src/input.css` | The app |
| `help.html`, `src/help.css` | The user guide |
| `review.html`, `src/js/review.js`, `src/review.css` | The data review page: entrance links and gaps to check, with answers downloaded as a spreadsheet |
| `sw.js`, `src/js/offline.js`, `src/manifest.webmanifest` | Working offline (the service worker, at the site root to cover it all) and the home screen app |
| `src/geojson/` | Campus data layers ([README](src/geojson/README.md)) |
| `src/basemap/` | Self-hosted basemap, terrain, fonts, and icons |
| `src/vendor/` | MapLibre GL JS and PMTiles ([README](src/vendor/README.md)) |
| `src/js/routing/` | Routing graph, route finder, slopes, shuttle rides, and step-by-step instructions, shared with `scripts/routing/` ([README](scripts/routing/README.md)) |
| `scripts/` | Local preview server and data/basemap tooling. Not deployed. |
| `tests/accessibility/` | Automated accessibility checks (axe-core and Playwright, used by CI only). Not deployed. |
| `tests/routing/` | Routing tests (Node's built-in test runner). Not deployed. |
| `docs/` | Data collection sheets and the usability testing plan |

See [updatingdata.md](updatingdata.md) for editing map data. See [ROADMAP.md](ROADMAP.md) for what's planned next.
Expand Down
19 changes: 16 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,24 @@ What's planned next, and what each item needs. Roughly in priority order within
- Reports show as unconfirmed ("reported 2 h ago") and expire after a day or two unless staff confirm them in the Sheet.
- The same Sheet-and-script approach for other data staff keep up to date: building hours, closures, entrance details.

## Data to check

- **Entrance links:** 53 links drawn automatically to 49 buildings' entrances: check them on the
[data review page](review.html) ([or the list](docs/data-collection/entrance-links-to-check.csv), longest first). Check each on the ground, and redraw
checked ones as real paths. Seven entrance points are drawn well inside their building: where are the doors?
- **Buildings still unreachable:** 9 (Brookline campus buildings, Claver Hall, 214 Beacon Street, 19 Mayflower Rd,
Haley House), in [buildings-without-accessible-entrance.csv](docs/data-collection/buildings-without-accessible-entrance.csv).

## Getting around

- **Shuttles:** live arrival times (see BC Transportation above); routes that change by day (holidays, football).
- **MBTA Green Line:** Boston College, Chestnut Hill Ave, Reservoir and Newton Centre stations, with elevator
outages from the MBTA's public feeds.
- **MBTA Green Line:** stations, live alerts, live train times, and train rides in routes (with schedules by time of
day and weekend) are in. Next: the MBTA buses at Reservoir and Chestnut Hill.
- **City sidewalks:** 1,432 crossings around campus have no curb information in OpenStreetMap. Tagging curb ramps
there (`kerb=lowered` on a crossing's end nodes) improves routes after `node scripts/osm-sidewalks.mjs`.
- The Brookline campus has no BC entrances mapped yet.
- The Brookline campus has entrances mapped but no paths, in BC's data or OpenStreetMap. Volunteers can map them in
OpenStreetMap ([guide](docs/data-collection/openstreetmap-mapping-guide.md)), or Facilities may have a site plan
(it was Pine Manor College) that can be converted.

## Inside buildings

Expand All @@ -50,5 +60,8 @@ What's planned next, and what each item needs. Roughly in priority order within

## Before relying on live directions

- Time the first load on a few real phones (`tests/accessibility/perf.mjs` slows the processor, but draws the map in
software, so it overstates map drawing, which a phone's graphics chip does).

- Test with students on real phones (iPhone and Android, with VoiceOver and TalkBack).
- Confirm the accessibility checks run on GitHub's servers ([.github/workflows/accessibility.yml](.github/workflows/accessibility.yml)).
20 changes: 20 additions & 0 deletions docs/data-collection/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Data collection templates

**The easiest way to check the data:** the [data review page](https://bcdigschol.github.io/accessbc/review.html)
(`review.html`) lists everything that needs checking (the entrance links, entrance points to check, and buildings
directions can't reach) on a map, each with "looks right / wrong" and a note, and downloads the answers as a
spreadsheet. It works out the list from the current data, so it's never out of date.

To map walkways where none are mapped yet (the Brookline campus), see the volunteer
[OpenStreetMap mapping guide](openstreetmap-mapping-guide.md).

Spreadsheets for BC Facilities and Disability Services to fill in. Each row is an entrance or elevator already on
the map (by `OBJECTID`, building, and coordinates); only the blank columns need answers. They open in Excel or
Google Sheets. Regenerate them after entrances or elevators change (this overwrites any answers, so copy those
Expand All @@ -9,6 +17,18 @@ out first):
node scripts/make-data-collection-sheets.mjs
```

`buildings-without-accessible-entrance.csv` lists the buildings directions can't go to yet, because no accessible
entrance is linked to the paths: most important first (buildings with restrooms, food, printing or seating, then
those with listed resources). *What is missing* says which kind of gap it is: **no accessible entrance mapped** (someone
needs to look at the building), or **entrance mapped, not connected to a path** (the entrance is on the map, but
more than 15 m from any path: drawing the path to it in `accessiblepaths.geojson` is enough).

`entrance-links-to-check.csv` lists the links drawn automatically from entrances that weren't connected to any
path (by `scripts/link-entrances.mjs`), longest first. They let directions reach those buildings, but nobody has
checked them: is the way from the door to the path paved, level, and free of steps? *Check first* marks entrances
drawn well inside their building, where the door may be somewhere else. A checked link can be redrawn as a real
path in `src/geojson/accessiblepaths.geojson`; re-running the script then drops the automatic one.

Once returned, the answers are merged into `src/geojson/entrances.geojson` and `elevators.geojson` as new
properties, and the app can then show them (automatic doors, intercom-only entrances, audible elevator
announcements, and so on) and use them in routing.
Loading
Loading