From 135c1e359a12a4e0634169dd727fb5a2066fa7ac Mon Sep 17 00:00:00 2001 From: Laurie Reynolds Date: Thu, 19 Nov 2026 14:04:32 -0800 Subject: [PATCH] issue #636: update the FAQ --- astro/src/content/escape-room-faq.json | 62 ++++++++ .../src/pages/escape-room/how-it-works.astro | 138 ++++++++++-------- astro/tests/e2e/escape-room-faq.spec.ts | 30 ++++ 3 files changed, 172 insertions(+), 58 deletions(-) create mode 100644 astro/src/content/escape-room-faq.json create mode 100644 astro/tests/e2e/escape-room-faq.spec.ts diff --git a/astro/src/content/escape-room-faq.json b/astro/src/content/escape-room-faq.json new file mode 100644 index 00000000..fbe085d3 --- /dev/null +++ b/astro/src/content/escape-room-faq.json @@ -0,0 +1,62 @@ +[ + { + "question": "What comes with an escape room kit?", + "answer": [ + "Each escape room kit comes with the following:" + ], + "items": [ + "Detailed instructions for assembling the room, include a list of materials to purchase.", + "Suggestions of additional (optional) materials and ideas to theme the space and add to the experience.", + "Files to download and print. If you are supporting blind players, you will need access to a braille printer.", + "Digital components that will make use of a provided phone, tablet or laptop.", + "Orientation materials to introduce the players and prepare them for the room and the theme.", + "Useful tips and hints for running a successful Escape Room, including specific instructions on resetting the room and packing the materials for shipping, travel or storage." + ] + }, + { + "question": "Can people who are blind or deaf-blind play?", + "answer": [ + "Yes, we have playtested with blind participants to ensure they can participate. Deaf-blind players are supported through a braille printouts of audio and other content. We also use tactile feedback on most of our puzzles and provide some tips for orienting visually- or cognitively-impaired players around the room before starting." + ] + }, + { + "question": "How long does it take to build an escape room?", + "answer": [ + "In general, it will take a few hours to assemble one of these kits once you've purchased the materials. We recommend setting up and playtesting the room a few times beforehand." + ] + }, + { + "question": "How long does it take to play an escape room?", + "answer": [ + "In general, our escape rooms will take between 15-40 mintues to play. However, this depends on several factors:" + ], + "items": [ + "How many people are in a group?", + "How experienced your participants are at escape rooms or puzzles?", + "How well your groups work together?", + "How spread out the puzzle pieces are in the room?", + "How well are certain clues hidden?" + ], + "closing": "Each of our kits allow for an optional puzzle to be purchased and built, which will also extend the play time." + }, + { + "question": "Can I use the escape room to raise money for my organization?", + "answer": [ + "Yes, you absolutely can. We only ask that you credit ", + { + "brand": "Accessible Community" + }, + " and any sponsors of each escape room by using the provided slide(s) in the orientation." + ] + }, + { + "question": "Are these available in languages other than English?", + "answer": [ + "We provide foreign language versions on request. If you are interested, please reach out to us directly at ", + { + "email": "escaperoom@accessiblecommunity.org" + }, + "." + ] + } +] diff --git a/astro/src/pages/escape-room/how-it-works.astro b/astro/src/pages/escape-room/how-it-works.astro index fd380d98..77f5f0fb 100644 --- a/astro/src/pages/escape-room/how-it-works.astro +++ b/astro/src/pages/escape-room/how-it-works.astro @@ -28,6 +28,7 @@ import { Icon } from "astro-icon/components"; import Row from "@components/Row.astro"; import ThemedSection from "@components/ThemedSection.astro"; +import faqs from "src/content/escape-room-faq.json"; import heroBg from "src/images/escape-room/shaded/puzzle-display.jpg"; --- @@ -37,7 +38,7 @@ import heroBg from "src/images/escape-room/shaded/puzzle-display.jpg"; -

Overview

+

Overview

We believe that team-building activities should be available to everyone. We've created the Accessible Escape Room to ensure that everyone can take part. @@ -77,58 +78,23 @@ import heroBg from "src/images/escape-room/shaded/puzzle-display.jpg";

Frequently Asked Questions

-
-
What comes with an escape room kit?
-
- Each escape room kit comes with the following: -
    -
  • Detailed instructions for assembling the room, include a list of materials to purchase.
  • -
  • Suggestions of additional (optional) materials and ideas to theme the space and add to the experience.
  • -
  • Files to download and print. If you are supporting blind players, you will need access to a braille printer.
  • -
  • Digital components that will make use of a provided phone, tablet or laptop.
  • -
  • Orientation materials to introduce the players and prepare them for the room and the theme.
  • -
  • Useful tips and hints for running a successful Escape Room, including specific instructions on resetting the room and packing the materials for shipping, travel or storage.
  • -
-
- -
Can people who are blind or deaf-blind play?
-
- Yes, we have playtested with blind participants to ensure they can participate. Deaf-blind players - are supported through a braille printouts of audio and other content. We also use tactile feedback - on most of our puzzles and provide some tips for orienting visually- or cognitively-impaired players - around the room before starting. -
- -
How long does it take to build an escape room?
-
- In general, it will take a few hours to assemble one of these kits once you've purchased the materials. - We recommend setting up and playtesting the room a few times beforehand. -
- -
How long does it take to play an escape room?
-
- In general, our escape rooms will take between 15-40 mintues to play. However, this depends on several factors: -
    -
  • How many people are in a group?
  • -
  • How experienced your participants are at escape rooms or puzzles?
  • -
  • How well your groups work together?
  • -
  • How spread out the puzzle pieces are in the room?
  • -
  • How well are certain clues hidden?
  • -
- Each of our kits allow for an optional puzzle to be purchased and built, which will also extend the - play time. -
- -
Can I use the escape room to raise money for my organization?
-
- Yes, you absolutely can. We only ask that you credit Accessible Community and any sponsors of each escape room by using the provided slide(s) in the orientation. -
- -
Are these available in languages other than English?
-
- We provide foreign language versions on request. If you are interested, please reach out to us directly at escaperoom@accessiblecommunity.org. -
-
+ {faqs.map(({ question, answer, items, closing }, index) => ( +
+ + {question} + + +
+ {answer.map(part => { + if (typeof part === "string") return part; + if (part.brand) return ; + return {part.email}; + })} + {items &&
    {items.map(item =>
  • {item}
  • )}
} + {closing} +
+
+ ))}
@@ -142,10 +108,66 @@ import heroBg from "src/images/escape-room/shaded/puzzle-display.jpg"; height: 0.7em; } - dl dd { - padding-inline-start: 1em; + .faq-item { + background-color: var(--bs-body-bg); + border: 1px solid var(--bs-border-color); + border-radius: var(--bs-border-radius-lg); } - dl dd + dt { - margin-top: 1em; + + .faq-item + .faq-item { + margin-block-start: 0.5rem; + } + + summary { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + padding: 0.75rem 1rem; + border-radius: inherit; + font-weight: 700; + list-style: none; + cursor: pointer; + } + + summary::-webkit-details-marker { + display: none; + } + + summary:focus-visible { + outline: 2px solid currentColor; + outline-offset: 2px; + } + + .faq-indicator { + flex: none; + display: grid; + place-items: center; + width: 1rem; + height: 1rem; + } + + .faq-indicator::before, + .faq-indicator::after { + content: ""; + grid-area: 1 / 1; + width: 0.75rem; + border-block-start: 2px solid currentColor; + } + + .faq-indicator::after { + transform: rotate(90deg); + } + + details[open] .faq-indicator::after { + display: none; + } + + .faq-answer { + padding: 0 1rem 1rem; + } + + .faq-answer > ul:last-child { + margin-block-end: 0; } - \ No newline at end of file + diff --git a/astro/tests/e2e/escape-room-faq.spec.ts b/astro/tests/e2e/escape-room-faq.spec.ts new file mode 100644 index 00000000..f973c34e --- /dev/null +++ b/astro/tests/e2e/escape-room-faq.spec.ts @@ -0,0 +1,30 @@ +import { expect, test } from "@playwright/test"; + +test("escape room FAQs expand and collapse by click and keyboard", async ({ page }) => { + await page.goto("/escape-room/how-it-works/"); + + const faq = page.locator("#faq"); + const openItems = faq.locator("details[open]"); + const kitAnswer = faq.getByText("Each escape room kit comes with the following:"); + const playAnswer = faq.getByText("In general, our escape rooms will take between", { exact: false }); + const playQuestion = faq.locator("summary").filter({ hasText: "How long does it take to play an escape room?" }); + + await expect(faq.locator("summary")).toHaveCount(6); + await expect(openItems).toHaveCount(1); + await expect(kitAnswer).toBeVisible(); + await expect(playAnswer).toBeHidden(); + + await playQuestion.click(); + await expect(openItems).toHaveCount(1); + await expect(kitAnswer).toBeHidden(); + await expect(playAnswer).toBeVisible(); + + await expect(playQuestion).toBeFocused(); + await page.keyboard.press("Space"); + await expect(openItems).toHaveCount(0); + await expect(playAnswer).toBeHidden(); + + await page.keyboard.press("Enter"); + await expect(openItems).toHaveCount(1); + await expect(playAnswer).toBeVisible(); +});