Skip to content

Add checklists #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions docs/components/checklist-web-all.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# General checklist for every web page on FINN

This checklist applies to all web pages on [FINN.no](https://finn.no/).

<TableOfContents />

## 1. Document title
Every page must have a non-empty [title element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title) located inside the [head element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head).

The purpose of the title is to provide the end users with a clear and concise clue about what the page entails.

### 1.1. Branding
All pages belonging to a specific market must include the market name in the title. All other pages must include **FINN.no** in the title.

The branding should be appended to the title with a vertical bar (|) as separator. For example: "Boliger i Oslo | FINN eiendom"

### 1.2. Title length
For static titles, the total length (including branding) must not exceed 60 characters. Titles containing user-generated content (such as ad titles) may be longer (i.e. don't truncate user-generated content in the title).

## 2. Main element
Every page must have exactly one [main element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main). Generally this element should wrap all content between Header and Footer. It must never include Header or Footer.

## 3. H1 element
Every page must have at least one main heading ([h1 element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)) located inside the main element mentioned in §2. It can be hidden visually with sr-only class if necessary.

## 4. Heading structure
Make sure all headings on the page follow the [Heading guidelines for screen readers](/screenreaders#headings).
37 changes: 37 additions & 0 deletions docs/components/checklist-web-results.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Checklist for search result pages

This checklist applies to all search result pages on [FINN.no](https://finn.no/).

<TableOfContents />

## 1. General checklist
Comply with the [Checklist for all web pages on FINN](./checklist-web-all).

## 2. Headings

### 2.1. The list of result items must begin with h1
Text of the h1 element can be "Søkeresultater", and it can be hidden visually with sr-only class if necessary.

### 2.2. Each result item must begin with h2
Text of the h2 element should be the title of the item and nothing else.

### 2.3. Each search filter must begin with h3
Text of the h3 element should be the name of the filter.

### 2.4. The paginator must begin with h1
Text of the h1 element can be "Resultatsider", and it can be hidden visually with sr-only class if necessary.


## 3. Landmarks

### 3.1. The list of result items must be wrapped in section
This [section element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section) must include the h1 mentioned in §2.1, and have [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)="Søkeresultater" or [aria-labelledby](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) referring to the id of the h1.

### 3.2. Each result item must be wrapped in article
This [article element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article) must include the h2 mentioned in §2.2.

### 3.3. The list of search filters must be wrapped in section
This [section element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section) must have [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)="Søkefiltre".

### 3.4. The paginator must be wrapped in nav
This [nav element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav) must include the h1 mentioned in §2.4, and have [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)="Resultatsider" or [aria-labelledby](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) referring to the id of the h1.
186 changes: 100 additions & 86 deletions src/pages/_app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.