Skip to content

Commit 2fe8508

Browse files
committed
feat: add new definitions for pagination
1 parent d533952 commit 2fe8508

File tree

5 files changed

+172
-24
lines changed

5 files changed

+172
-24
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "ARIA Attributes"
3+
description: "HTML attributes that provide accessibility information to assistive technologies"
4+
---
5+
6+
# ARIA Attributes
7+
8+
ARIA (Accessible Rich Internet Applications) attributes are HTML attributes that provide additional information about web content and UI components to assistive technologies, such as screen readers. They help make web applications more accessible to users with disabilities.
9+
10+
## Common ARIA Attributes
11+
12+
- `aria-label`: Provides a text label for elements
13+
- `aria-current`: Indicates the current item in a set
14+
- `aria-expanded`: Shows if an expandable element is open
15+
- `aria-hidden`: Hides elements from assistive technologies
16+
- `aria-live`: Announces dynamic content changes
17+
18+
## Best Practices
19+
20+
- Use semantic HTML elements when possible
21+
- Only add ARIA attributes when necessary
22+
- Test with screen readers
23+
- Keep labels clear and concise
24+
25+
## Implementation Examples
26+
27+
```html
28+
<!-- Navigation with ARIA -->
29+
<nav aria-label="Pagination">
30+
<button aria-label="Previous page">Previous</button>
31+
<button aria-current="page">1</button>
32+
<button aria-label="Next page">Next</button>
33+
</nav>
34+
```
35+
36+
## Related Patterns
37+
38+
- [Pagination](/patterns/navigation/pagination)
39+
- [Navigation Patterns](/patterns/navigation)

content/en/glossary/pagination.mdx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Pagination"
3-
description: "A navigation pattern that divides content into separate pages, allowing users to browse through large sets of data or content in manageable chunks."
3+
description: "A navigation pattern that divides content into separate pages to improve usability and performance"
44
category: ["Pattern", "Navigation"]
55
related_patterns:
66
["/patterns/navigation/pagination", "/patterns/navigation/infinite-scroll"]
@@ -18,6 +18,28 @@ import { GlossaryStructuredData } from "@app/_components/glossary/structured-dat
1818

1919
# Pagination
2020

21-
## Definition
21+
Pagination is a fundamental user interface pattern that divides large sets of content into smaller, more manageable chunks called "pages". This pattern helps users navigate through extensive collections of data, such as search results, product listings, or blog posts.
2222

23-
Pagination is a user interface pattern that breaks down large sets of content into smaller, more manageable pages that can be accessed through navigation controls. It helps users navigate through extensive content while maintaining performance and usability.
23+
## Key Characteristics
24+
25+
- Breaks content into discrete pages
26+
- Provides navigation controls (previous/next, page numbers)
27+
- Maintains user orientation within large datasets
28+
- Supports bookmarking and sharing specific pages
29+
30+
## Benefits
31+
32+
- Improves page load performance
33+
- Reduces cognitive load on users
34+
- Enables better content organization
35+
- Supports efficient server-side data handling
36+
37+
## Related Patterns
38+
39+
- [Pagination Pattern](/patterns/navigation/pagination)
40+
- [Infinite Scroll](/patterns/navigation/infinite-scroll)
41+
- [Load More](/patterns/navigation/load-more)
42+
43+
## Learn More
44+
45+
For detailed implementation guidelines and best practices, see the [Pagination Pattern](/patterns/navigation/pagination) documentation.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: "Progressive Loading"
3+
description: "A technique that loads content gradually to improve initial page load times and user experience"
4+
---
5+
6+
# Progressive Loading
7+
8+
Progressive Loading is a performance optimization technique that loads content and resources gradually rather than all at once. This approach improves initial page load times and provides a better user experience, especially for users with slower internet connections.
9+
10+
## Key Concepts
11+
12+
- Content is loaded in stages or chunks
13+
- Initial load focuses on essential content
14+
- Additional content loads as needed
15+
- Can be triggered by user actions or automatically
16+
17+
## Common Applications
18+
19+
- Image loading (thumbnails before full resolution)
20+
- Paginated content loading
21+
- Infinite scroll implementations
22+
- Large data table loading
23+
24+
## Benefits
25+
26+
- Faster initial page loads
27+
- Reduced server load
28+
- Better user experience
29+
- Improved perceived performance
30+
31+
## Related Patterns
32+
33+
- [Pagination](/patterns/navigation/pagination)
34+
- [Infinite Scroll](/patterns/navigation/infinite-scroll)
35+
- [Load More](/patterns/navigation/load-more)

content/en/glossary/semantic-html.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Semantic HTML"
3+
description: "HTML elements that carry meaning about their content structure and purpose"
4+
---
5+
6+
# Semantic HTML
7+
8+
Semantic HTML refers to using HTML elements that clearly describe their meaning and purpose, rather than just their presentation. This practice improves accessibility, SEO, and code maintainability by providing clear structural information about the content.
9+
10+
## Key Elements
11+
12+
- `<nav>`: Navigation sections
13+
- `<main>`: Main content area
14+
- `<article>`: Self-contained content
15+
- `<section>`: Thematic grouping
16+
- `<header>`: Introductory content
17+
- `<footer>`: Concluding content
18+
19+
## Benefits
20+
21+
- Improved accessibility
22+
- Better SEO performance
23+
- Clearer code structure
24+
- Enhanced maintainability
25+
- Consistent cross-browser support
26+
27+
## Example Usage
28+
29+
```html
30+
<nav aria-label="Main">
31+
<ul>
32+
<li><a href="/">Home</a></li>
33+
<li><a href="/about">About</a></li>
34+
</ul>
35+
</nav>
36+
37+
<main>
38+
<article>
39+
<h1>Article Title</h1>
40+
<section>
41+
<h2>Section Heading</h2>
42+
<p>Content goes here...</p>
43+
</section>
44+
</article>
45+
</main>
46+
```
47+
48+
## Related Patterns
49+
50+
- [Pagination](/patterns/navigation/pagination)
51+
- [Navigation Patterns](/patterns/navigation)

content/en/patterns/navigation/pagination.mdx

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { StepsPagination } from "@app/_components/seo/steps-pagination.tsx";
1616

1717
## Overview
1818

19-
**Pagination** is a navigation pattern used to divide large collections of content into manageable chunks or pages.
19+
**[Pagination](/glossary/pagination)** is a navigation pattern used to divide large collections of content into manageable chunks or pages.
2020
This helps users to navigate through data sets, search results, or product listings without overwhelming the page with too much information at once.
2121

2222
While pagination is a common and effective pattern, it's important to consider alternatives like [infinite scroll](/patterns/navigation/infinite-scroll) or ["Load More"](/patterns/navigation/load-more) buttons for certain types of content. The choice between pagination and infinite scroll depends on factors such as the nature of the content, user behavior, and the goals of the interface.
@@ -214,18 +214,18 @@ flowchart TB
214214

215215
#### Too Many Pages (No Page Limiting)
216216

217-
**❌ Whats Wrong?**
217+
**❌ What's Wrong?**
218218

219219
Users get overwhelmed if there are **dozens of pages** to click through, making it hard to find relevant content.
220220

221221
**How to Fix It?**
222-
Consider using **Load More** or **infinite scroll** if the content is suited to continuous exploration. If pagination is necessary, cap the total pages or provide filters to reduce results.
222+
Consider using **"Load More"** or **infinite scroll** if the content is suited to continuous exploration. If pagination is necessary, cap the total pages or provide filters to reduce results.
223223

224224
---
225225

226226
#### Hiding Pagination Controls on Mobile
227227

228-
**❌ Whats Wrong?**
228+
**❌ What's Wrong?**
229229

230230
Some designs remove pagination on smaller screens, forcing mobile users to scroll endlessly or guess how to navigate deeper pages.
231231

@@ -236,7 +236,7 @@ Use a **compact pagination menu** (e.g., next/previous buttons or a limited set
236236

237237
#### Not Remembering the Last Page
238238

239-
**❌ Whats Wrong?**
239+
**❌ What's Wrong?**
240240

241241
When users navigate away and come back, they lose track of which page they were on, leading to frustration and repetitive browsing.
242242

@@ -247,7 +247,7 @@ Store pagination state in the **URL (e.g., `?page=2`)** or in session/local stor
247247

248248
#### Inconsistent Page Numbers (Jumping Pages)
249249

250-
**❌ Whats Wrong?**
250+
**❌ What's Wrong?**
251251

252252
Some pagination systems remove or rearrange pages based on dynamic data, confusing users who rely on consistent numbering.
253253

@@ -258,9 +258,9 @@ Maintain a **stable page structure**—if new items appear, consider adding them
258258

259259
#### No Keyboard Accessibility (Accessibility)
260260

261-
**❌ Whats Wrong?**
261+
**❌ What's Wrong?**
262262

263-
If pagination links or buttons arent keyboard-focusable, users relying on the keyboard cant move between pages effectively.
263+
If pagination links or buttons aren't keyboard-focusable, users relying on the keyboard can't move between pages effectively.
264264

265265
**How to Fix It?**
266266
Use proper interactive elements (`<button>`, `<a href>`). Confirm `Tab` navigation works for each link or control, and that pressing `Enter` or `Space` actually triggers page changes.
@@ -269,34 +269,34 @@ Use proper interactive elements (`<button>`, `<a href>`). Confirm `Tab` navigati
269269

270270
#### Poorly Labeled Page Links (Accessibility)
271271

272-
**❌ Whats Wrong?**
272+
**❌ What's Wrong?**
273273

274-
Screen readers cant convey page numbers or next/previous actions if the links have generic text like ... or Page.
274+
Screen readers can't convey page numbers or next/previous actions if the links have generic text like "..." or "Page."
275275

276276
**How to Fix It?**
277-
Add `aria-label` attributes (e.g., `aria-label="Go to page 2"`) or text that clearly states each pages purpose. For Next and Previous, label them explicitly (e.g., `aria-label="Go to next page"`).
277+
Add `aria-label` attributes (e.g., `aria-label="Go to page 2"`) or text that clearly states each page's purpose. For "Next" and "Previous," label them explicitly (e.g., `aria-label="Go to next page"`).
278278

279279
---
280280

281281
#### No Visible Focus Indicator (Accessibility)
282282

283-
**❌ Whats Wrong?**
283+
**❌ What's Wrong?**
284284

285-
Users cant see where their keyboard focus is if the pagination links have no visible outline or highlight.
285+
Users can't see where their keyboard focus is if the pagination links have no visible outline or highlight.
286286

287287
**How to Fix It?**
288-
Include a **high-contrast focus style** (outline, underline, etc.) so its obvious which page or button is selected or about to be selected.
288+
Include a **high-contrast focus style** (outline, underline, etc.) so it's obvious which page or button is selected or about to be selected.
289289

290290
---
291291

292292
#### Unclear Feedback After Page Selection (Accessibility)
293293

294-
**❌ Whats Wrong?**
294+
**❌ What's Wrong?**
295295

296296
When users click a pagination link, especially if the new page loads asynchronously, they might not realize the content has updated.
297297

298298
**How to Fix It?**
299-
Use an **ARIA live region** or a brief status announcement (e.g., Page 2 loaded) so screen reader users (and everyone else) know new content has appeared.
299+
Use an **ARIA live region** or a brief status announcement (e.g., "Page 2 loaded") so screen reader users (and everyone else) know new content has appeared.
300300

301301
## Micro-Interactions & Animations
302302

@@ -323,7 +323,7 @@ When building pagination, consider these specific, purpose-driven animations:
323323
- **Timing:** Transition the content opacity over approximately 250ms to ensure a smooth change without distracting from the overall experience.
324324

325325
- **Reduced Motion Consideration:**
326-
- **Implementation:** Always check for the users motion preferences (e.g., via the `prefers-reduced-motion` media query) and disable or minimize animations accordingly to ensure accessibility.
326+
- **Implementation:** Always check for the user's motion preferences (e.g., via the `prefers-reduced-motion` media query) and disable or minimize animations accordingly to ensure accessibility.
327327

328328
These precise animations provide just enough feedback to guide user interactions and enhance the overall feel of your pagination component without overwhelming the interface.
329329

@@ -344,11 +344,11 @@ Each pagination interaction provides valuable insights into user behavior. Below
344344
| `pagination.first_click` | When a user clicks the first page button (if available). | Measures how often users return to the beginning. |
345345
| `pagination.last_click` | When a user clicks the last page button (if available). | Indicates if users want to skip directly to the end. |
346346
| `pagination.page_load` | When a new paginated page loads (via user interaction or auto-pagination). | Helps measure engagement depth. |
347-
| `pagination.scroll_usage` | If infinite scrolling is enabled, tracks when users reach a pagination trigger (e.g., Load More button). | Helps compare pagination click interactions vs. scrolling behavior. |
347+
| `pagination.scroll_usage` | If infinite scrolling is enabled, tracks when users reach a pagination trigger (e.g., "Load More" button). | Helps compare pagination click interactions vs. scrolling behavior. |
348348

349349
### Event Payload Structure
350350

351-
To ensure consistent tracking, heres a recommended event format:
351+
To ensure consistent tracking, here's a recommended event format:
352352

353353
```json
354354
{
@@ -486,7 +486,7 @@ By continuously monitoring these metrics, we can refine pagination usability, en
486486

487487
### ARIA Attributes
488488

489-
**Required ARIA attributes:**
489+
**Required [ARIA Attributes](/glossary/aria-attributes):**
490490

491491
- The container should use role="navigation" with an appropriate aria-label (e.g., "Pagination Navigation").
492492
- Each pagination item should include aria-labels indicating the respective page number.
@@ -504,8 +504,9 @@ The following table outlines the standard keyboard interactions for pagination c
504504

505505
## SEO
506506

507-
- Use semantic HTML (e.g., `<nav>` and lists) to help search engines understand your site structure.
507+
- Use [semantic HTML](/glossary/semantic-html) (e.g., `<nav>` and lists) to help search engines understand your site structure.
508508
- Ensure that pagination links are crawlable, improving site indexing.
509+
- Consider implementing [progressive loading](/glossary/progressive-loading) for better performance and user experience.
509510

510511
## Testing Guidelines
511512

0 commit comments

Comments
 (0)