diff --git a/README.md b/README.md index bf1b6c08..df4bbe15 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,6 @@ http://it2810-03.idi.ntnu.no/project2/ - **Profile:** Your preferences and saved plants in one place. - **Language and theme:** The app is available in English and Norwegian, and has a light and a dark theme. -## Accessibility - -The app includes the following accessibility features: - -- **Page structure:** Semantic `header`, `nav`, `main` and `article` elements organise the content. Sidebar navigation has an accessible name, and the current page is marked with `aria-current="page"`. -- **Keyboard controls:** Navigation uses links, and actions use native buttons. Sidebar links, pagination, sorting controls and avatar options have explicit focus styles. Plant Match instructions are also shown when their control receives focus. -- **Forms and images:** Search, filters and profile inputs have associated labels. Plant images use the plant name as alternative text, and profile and avatar images also include alternative text. -- **Control states:** The sort menu exposes its expanded state, and sort and avatar choices expose their selected state with ARIA attributes. Pagination announces page changes through an `aria-live="polite"` region. -- **Plant cards:** The inactive side of a flipped card is hidden from assistive technology with `aria-hidden`, and its information button is removed from the keyboard tab order. -- **Reduced motion:** The card flip and My Matches hover transitions are disabled when the user requests reduced motion. - -The deployed production version received an Accessibility score of **100 in Lighthouse** in our latest reported run. Automated component tests also check selected accessible names, navigation state and sorting states. This does not establish full WCAG compliance; a complete manual keyboard and screen reader audit has not been verified here. - ## Tech stack | Part | Technology | @@ -108,8 +95,6 @@ The project has three `package.json` files: one in the repo root, one in `backen | `npm run lint` | Runs ESLint in `backend`, then in `frontend`. | Before you push or open a pull request. | | `npm test` | Runs the frontend tests once with Vitest and exits. | Before you push or open a pull request. | -`npm run lint`, `npm test` and `npm run build` are the same checks GitHub Actions runs on every pull request, so running them locally first saves you a failed CI run. - #### Scripts in `backend` and `frontend` You can also run scripts in one part of the project only, either with `cd backend` / `cd frontend` or with `--prefix` from the root (for example `npm run dev --prefix backend`). This is useful if you only work on one side, or want the backend and frontend output in separate terminals. @@ -122,23 +107,9 @@ You can also run scripts in one part of the project only, either with `cd backen | `frontend` | `npm test` | Runs Vitest in watch mode, so the tests run again every time you save a file. | | `frontend` | `npm run preview` | Serves the production build from `dist/` locally. Run `npm run build` first. | -## Testing - -See [tests.md](docs/tests.md) for what we test, how the tests are organised and how to run them. - -To run all tests from the repo root: - -```bash -npm test -``` - -Lint, tests and build also run automatically on every pull request through GitHub Actions ([.github/workflows/ci.yml](.github/workflows/ci.yml)). - -TODO! The testing coverage is: - ## Quality and design -See [quality.md](docs/quality.md) for our design choices, accessibility considerations, sustainable web development +See [quality.md](docs/quality.md) for Lighthouse results, testing, accessibility, design choices, sustainable web development and work practices. ## Known issues diff --git a/docs/quality.md b/docs/quality.md index c8ed5ea8..ffe4182b 100644 --- a/docs/quality.md +++ b/docs/quality.md @@ -23,6 +23,20 @@ This document describes how we have worked to ensure the quality of the applicat ## Testing +See [tests.md](tests.md) for what we test, how the tests are organised and how to run them. + +To run all tests from the repo root: + +```bash +npm test +``` + +Lint, tests and build also run automatically on every pull request through GitHub Actions ([.github/workflows/ci.yml](../.github/workflows/ci.yml)). + +TODO! The testing coverage is: + +`npm run lint`, `npm test` and `npm run build` are the same checks GitHub Actions runs on every pull request, so running them locally first saves you a failed CI run. + - Snapshot tests are used to detect unintended changes to the rendered UI. - In addition to automated testing, we manually tested the application throughout development as new features were implemented. This allowed us to evaluate usability and verify that the application behaved as intended. @@ -35,20 +49,23 @@ For more details about individual test files, see test coverage, and instruction ## Accessibility -We considered accessibility throughout the design and development of the application. +The app includes the following accessibility features: -- **Semantic HTML and navigation:** We use semantic HTML elements such as `