An open API service indexing awesome lists of open source software.

https://github.com/haquanq-frontendmentor/faq-accordion

Solution for frontendmentor.io challenge: faq-accordion
https://github.com/haquanq-frontendmentor/faq-accordion

accessibility css frontendmentor frontendmentor-newbie html javascript

Last synced: about 1 month ago
JSON representation

Solution for frontendmentor.io challenge: faq-accordion

Awesome Lists containing this project

README

          

## Frontend Mentor - FAQ Accordion Solution

This is a solution to the [FAQ accordion challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/accordion-accordion-wyfFdeBwBz).
Frontend Mentor challenges help you improve your coding skills by building realistic projects.



Solution post


Live demo


![](./docs/preview.jpg)

## Table of Contents

- [Project Overview](#sunrise-project-overview)
- [Tech Stack and Approach](#stars-tech-stack-and-approach)
- [Local Development](#leaves-local-development)
- [Deployment](#maple_leaf-deployment)

## :sunrise: Project Overview

### Challenge Requirements

- Hide/Show the answer to a question when the question is clicked
- Navigate the questions and hide/show answers using keyboard navigation alone
- View the optimal layout for the interface depending on their device's screen size
- See hover and focus states for all interactive elements on the page

### Status

Features

- [x] Accordion with JavaScript based animation, expand and collapse

Accessibility

- [x] Site is responsive to different screen sizes.
- [x] Interactive elements has clear focus indicator.
- [x] Element's animation reponse to user prefered motion style (reduced motion).

## :stars: Tech Stack and Approach

### Built with

- **HTML5** – Semantic structure
- **Vanilla CSS** – Flex layout
- **BrowserSync** - Easy development server

### Approach

- Mobile-first workflow for better performance on smaller devices
- Accessibility guided by [ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/).

## :leaves: Local Development

### Prerequisites

Install the following:

- Git (latest version)
- Node.js (latest LTS recommended)
- pnpm (latest version)

### Setup

```
git clone https://github.com/haquanq-frontendmentor/faq-accordion.git
cd faq-accordion
pnpm install
```

### Start Development Server

```
pnpm dev
```

## :maple_leaf: Deployment

Deployed to Github Pages via Github Action.