rubyforgood / rubyforgood/awbw

Story Share portal: Safety Exit quick-escape button

Open
#2,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement stories
Dominant language
Ruby
Stars
15
Forks
26
Avg merge
12h 42m
Merged PRs (30d)
242

Description

Context

The Story Share portal (/story_shares) serves an audience that includes domestic-violence survivors. The live WordPress site (stories.awbw.org) has a prominent "Safety Exit" button that lets a visitor leave the site instantly.

An initial JS implementation (a safety_exit Stimulus controller doing window.open + location.replace) was built and then removed from the portal-parity PR (#2148) to keep it lean — and because a plain no-JS link gives false security (it navigates away but doesn't scrub browser history, so the back button still returns to the story).

What's needed

  • A Safety Exit control that meaningfully protects the visitor:
    • Navigates away to a neutral site (e.g. weather.com) immediately.
    • Scrubs/replaces history so the back button doesn't return to the portal (location.replace, and ideally overwrite prior entries).
    • Optionally opens a decoy tab and/or clears the current tab's content first.
    • Keyboard shortcut (the WP site / common patterns use a quick key) and a fixed, always-visible button on every portal page, including mobile.
  • Accessibility: clearly labeled, high-contrast, reachable without scrolling.
  • Document the inherent limitation (client-side JS cannot fully erase browser history) and decide whether that's acceptable or whether to add guidance.

Notes

Prior implementation for reference is in the git history of PR #2148 (app/frontend/javascript/controllers/safety_exit_controller.js, since removed).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the removed app/frontend/javascript/controllers/safety_exit_controller.js and the portal-parity changes in PR #2148 first. Trace how the /story_shares portal renders across pages and mobile, then define and verify an accessible, always-visible control and keyboard shortcut whose navigation and history behavior match the agreed safety requirements; document the client-side history limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.