Skip to content
Merged

Next #160

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7af9abf
feat: enhance Footer component with accessible-astr-components Link a…
markteekman Aug 31, 2025
e80178b
feat: update Header component to use accessible-astro-components Link…
markteekman Aug 31, 2025
d854c90
feat: add FeaturedPosts and FeaturedProjects components for showcasin…
markteekman Sep 3, 2025
ab0a506
feat: change extension to .ts for content collection
markteekman Sep 4, 2025
307ca0b
update: update navigation breakpoint to accommodate for added menu item
markteekman Sep 4, 2025
c2b0704
refactor: replace anchor tags with Link component in Header
markteekman Sep 4, 2025
7087bf3
refactor: replace headings with Heading component and anchor tags wit…
markteekman Sep 5, 2025
be69333
feat: add contact and thank-you pages with accessible form components…
markteekman Sep 6, 2025
4777c0b
feat: enhance accessible-components page with new components and impr…
markteekman Sep 9, 2025
257581b
feat: expand accessible-components page with new Badge variations and…
markteekman Sep 9, 2025
de63d93
feat: update social media links in contact page to open in new tabs f…
markteekman Sep 9, 2025
7ab6c61
refactor: remove ExternalLink component and replace its usage with Li…
markteekman Sep 9, 2025
bc0e007
refactor: replace anchor tags with Link component in SocialShares and…
markteekman Sep 9, 2025
644ef42
feat: replace testimonial text with BlockQuote component for improved…
markteekman Sep 9, 2025
3520b57
refactor: replace standard HTML headings and anchor tags with Heading…
markteekman Sep 9, 2025
97f7e54
fix: add aria-hidden attribute to icons across multiple components fo…
markteekman Sep 10, 2025
9f69ab7
chore: update devDependencies and dependencies in package.json
markteekman Sep 10, 2025
5028d37
chore: add @types/sanitize-html to devDependencies in package.json #154
markteekman Sep 11, 2025
208985d
fix: update accessible-components page
markteekman Sep 11, 2025
71c658a
refactor: remove unnecessary utility class from Logo component for cl…
markteekman Sep 11, 2025
13efe57
docs: update README to reflect compliance with WCAG 2.2 AA and Europe…
markteekman Sep 13, 2025
483bd81
feat: add sitemap integration and create sitemap page; update Footer …
markteekman Sep 13, 2025
2da420e
chore: update social preview image for enhanced visual representation
markteekman Sep 13, 2025
052acc2
fix: correct typo in 404 page and update phone link format in contact…
markteekman Sep 13, 2025
f233997
docs: refine README to acknowledge Niek Derksen's contributions for a…
markteekman Sep 13, 2025
ac869f1
chore: upgrade accessible-astro-components to version 5.0.0 for impro…
markteekman Sep 13, 2025
13d9fbe
chore: bump version to 4.2.0 in package.json for upcoming release
markteekman Sep 13, 2025
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
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![accessible-astro-starter](https://github.com/user-attachments/assets/01630a5b-10bb-4765-a291-74725fedc04f)

A ready-to-use, SEO and accessibility-focused Astro starter template. Built with modern web standards and WCAG guidelines in mind, it provides a solid foundation for creating inclusive websites. Features Tailwind CSS 4 integration, comprehensive component library, color contrast checker, and typography with Atkinson Hyperlegible font for improved readability. Includes dynamic blog/portfolio pages with social sharing, and full MDX support.
A ready-to-use, SEO and accessibility-focused Astro starter template. Built with modern web standards, WCAG 2.2 AA guidelines, and European Accessibility Act (EAA) compliance in mind, it provides a solid foundation for creating inclusive websites. Features Tailwind CSS 4 integration, comprehensive component library with enhanced form validation, color contrast checker, and typography with Atkinson Hyperlegible font for improved readability. Includes dynamic blog/portfolio pages with social sharing, contact forms, and full MDX support.

[![LIVE DEMO](https://img.shields.io/badge/LIVE_DEMO-4ECCA3?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro-starter.incluud.dev/)  
[![DOCUMENTATION](https://img.shields.io/badge/DOCUMENTATION-A682FF?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro.incluud.dev/)  
Expand All @@ -16,15 +16,16 @@ A ready-to-use, SEO and accessibility-focused Astro starter template. Built with

## (Accessibility) Features

- Astro 5.7.5+
- Tailwind CSS 4 support
- TypeScript integration with path aliases for easier imports
- Astro 5.13.0+
- Tailwind CSS 4.1+ support
- TypeScript integration with path aliases for easier imports and content collections support
- Prettier integration with `prettier-plugin-astro` and `prettier-plugin-tailwind`
- ESLint integration with strict accessibility settings for `eslint-plugin-jsx-a11y`
- Markdown and MDX support with comprehensive examples and components
- Modern OKLCH color system with automatic palette generation from primary/secondary colors
- Atkinson Hyperlegible font for improved readability and accessibility
- Lucide icon set via `astro-icon` for consistent, friendly icons
- Semantic HTML structure with `Button`, `Link` and `Heading` components
- Excellent Lighthouse/PageSpeed scores
- Accessible landmarks such as `header`, `main`, `footer`, `section` and `nav`
- Outline focus indicator which works on dark and light backgrounds
Expand All @@ -40,10 +41,16 @@ A ready-to-use, SEO and accessibility-focused Astro starter template. Built with
- `SiteMeta.astro` SEO component for setting custom meta data on different pages
- `.sr-only` utility class for screen reader only text content (hides text visually)
- `prefers-reduced-motion` disables animations for users that have this preference turned on
- Components including `ColorContrast.astro`, `BlockQuote.astro`, `BreakoutImage.astro`, `ExternalLink.astro`, `Logo.astro`, `SocialShares.astro`, and `PageHeader.astro`
- Components including `ColorContrast.astro`, `BlockQuote.astro`, `BreakoutImage.astro`, `Logo.astro`, `SocialShares.astro`, `PageHeader.astro`, `FeaturedPosts.astro`, and `FeaturedProjects.astro`
- Enhanced form components with comprehensive validation: `Form`, `Input`, `Textarea`, `Checkbox`, `Radio`, and `Fieldset` with WCAG 2.2 compliance
- Automatic form validation with custom patterns, error handling, and screen reader support
- Blog and portfolio pages with featured images, author details, social sharing, and breakout images
- Contact page with comprehensive form validation showcase and accessibility demonstrations
- Thank-you page for form submissions with interactive feedback
- Accessibility Statement template page
- Color Contrast Checker interactive page
- Comprehensive sitemap page with organized navigation and automatic XML sitemap generation via `@astrojs/sitemap`
- Enhanced accessible-components showcase page with expanded component demonstrations
- Smooth micro-interactions and animations on hover, open and close states (respecting reduced motion preferences)
- Comprehensive SCSS utility classes
- CSS with logical properties and custom properties
Expand Down Expand Up @@ -91,6 +98,7 @@ We want to express our heartfelt gratitude to everyone who contributes to making

- **The Astro team** for creating an amazing static site generator and the wonderful Starlight theme
- **Our contributors** who dedicate their time and expertise to improve these tools
- [**Niek Derksen**](https://niekderksen.nl) for conducting comprehensive accessibility audits to ensure WCAG compliance
- **Our sponsors** who help make this project sustainable
- **The web community** for embracing and promoting web accessibility
- **You, the developer** for choosing to make your projects more accessible
Expand Down
6 changes: 4 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import icon from 'astro-icon'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath } from 'url'

import sitemap from '@astrojs/sitemap';

// https://astro.build/config
export default defineConfig({
compressHTML: true,
site: 'https://accessible-astro-starter.incluud.dev',
integrations: [mdx(), icon(), compress()],
integrations: [mdx(), icon(), compress(), sitemap()],
vite: {
css: {
preprocessorOptions: {
Expand All @@ -34,4 +36,4 @@ export default defineConfig({
},
},
},
})
})
34 changes: 18 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "accessible-astro-starter",
"description": "An Accessible Starter Theme for Astro including several accessibility features and tools to help you build faster.",
"version": "4.1.1",
"version": "4.2.0",
"author": "Incluud",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -34,32 +34,34 @@
"url": "https://github.com/incluud/accessible-astro-starter/issues"
},
"devDependencies": {
"@astrojs/mdx": "^4.3.0",
"@astrojs/mdx": "^4.3.5",
"@astrojs/partytown": "^2.1.4",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.27.0",
"@iconify-json/lucide": "^1.2.44",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"astro": "^5.8.0",
"@eslint/js": "^9.35.0",
"@iconify-json/lucide": "^1.2.66",
"@types/sanitize-html": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"astro": "^5.13.7",
"astro-compress": "^2.3.8",
"astro-eslint-parser": "^1.2.2",
"astro-icon": "^1.1.5",
"eslint": "^9.27.0",
"eslint": "^9.35.0",
"eslint-plugin-astro": "^1.3.1",
"eslint-plugin-jsx-a11y": "^6.10.2",
"globals": "^16.1.0",
"prettier": "^3.5.3",
"globals": "^16.4.0",
"prettier": "^3.6.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-tailwindcss": "^0.6.11",
"prettier-plugin-tailwindcss": "^0.6.14",
"sanitize-html": "^2.17.0",
"sass": "^1.89.0",
"svgo": "^3.3.2",
"tailwindcss": "^4.1.7"
"sass": "^1.92.1",
"svgo": "^4.0.0",
"tailwindcss": "^4.1.13"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.7",
"accessible-astro-components": "^4.1.2"
"@astrojs/sitemap": "^3.5.1",
"@tailwindcss/vite": "^4.1.13",
"accessible-astro-components": "^5.0.0"
}
}
Binary file modified public/social-preview-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/assets/scss/base/_breakpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $breakpoints: (
'l': 1024px,
'xl': 1280px,
'2xl': 1536px,
'nav': 900px,
'nav': 1000px,
) !default;

@mixin breakpoint($breakpoint) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/BlockQuote.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const { author } = Astro.props

<blockquote class="border-primary-500 border-l-4 pl-4">
<div>
<Icon name="lucide:quote" size="2rem" />
<Icon aria-hidden="true" name="lucide:quote" size="2rem" />
<slot />
<Icon name="lucide:quote" size="2rem" />
<Icon aria-hidden="true" name="lucide:quote" size="2rem" />
</div>
{author && <cite class="block text-sm font-medium">{author}</cite>}
</blockquote>
Expand Down
39 changes: 5 additions & 34 deletions src/components/CallToAction.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { Heading, Link } from 'accessible-astro-components'
import { Icon } from 'astro-icon/components'

/**
Expand Down Expand Up @@ -33,11 +34,11 @@ const {

<div class="container">
<div class="call-to-action mt-24 mb-32 flex flex-col items-center gap-12 rounded-xl px-12 py-20 md:px-24">
<h2 class="text-center text-3xl md:text-6xl">{title}</h2>
<a href={link} class="text-center text-2xl">
<Heading level="h2" class="text-center text-3xl md:text-6xl">{title}</Heading>
<Link href={link} isButton size="lg" animateOnHover animationType="nudge">
{linkText}
<Icon name="lucide:arrow-right" />
</a>
<Icon aria-hidden="true" name="lucide:rocket" size="1.5rem" />
</Link>
</div>
</div>

Expand All @@ -51,36 +52,6 @@ const {
light-dark(var(--color-primary-100), var(--color-secondary-100)) 25%,
light-dark(var(--color-secondary-100), var(--color-primary-200))
);

color: var(--color-neutral-900);
}

a,
a:visited {
display: flex;
align-items: center;
gap: var(--space-2xs);
border: 3px solid var(--color-neutral-900);
border-radius: var(--radius-s);
padding: var(--space-s);
color: var(--color-neutral-900);
font-weight: bold;
text-decoration: none;

@include text-decoration(transparent, currentColor);

[data-icon] {
transition: translate var(--animation-speed-fast) var(--cubic-bezier);
}

&:where(:hover, :focus) {
background-color: var(--color-neutral-900);
color: var(--color-neutral-100);
text-decoration: underline;

[data-icon] {
translate: 5px 0;
}
}
}
</style>
13 changes: 7 additions & 6 deletions src/components/ColorContrast.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface Props {

const { class: className } = Astro.props

import { Tabs, TabsList, TabsTab, TabsPanel } from 'accessible-astro-components'
import { Heading, Tabs, TabsList, TabsTab, TabsPanel } from 'accessible-astro-components'

interface ColorGroup {
name: string
Expand Down Expand Up @@ -65,13 +65,13 @@ const themes: Theme[] = [
<TabsPanel id={`${theme.id}-panel`} labelledby={theme.id} selected={index === 0}>
<div class="theme-section">
<div class="theme-header">
<h2>{theme.name}</h2>
<Heading level="h2">{theme.name}</Heading>
<p>{theme.description}</p>
</div>
<div class="color-categories">
{/* Three column layout for color categories */}
<div class="color-category">
<h3>Primary Colors</h3>
<Heading level="h3">Primary Colors</Heading>
<div class="colors">
{colorGroups[0].values.map((value) => (
<div
Expand All @@ -90,7 +90,7 @@ const themes: Theme[] = [
</div>

<div class="color-category">
<h3>Secondary Colors</h3>
<Heading level="h3">Secondary Colors</Heading>
<div class="colors">
{colorGroups[1].values.map((value) => (
<div
Expand All @@ -109,7 +109,7 @@ const themes: Theme[] = [
</div>

<div class="color-category">
<h3>Neutral Colors</h3>
<Heading level="h3">Neutral Colors</Heading>
<div class="colors">
{colorGroups[2].values.map((value) => (
<div
Expand Down Expand Up @@ -274,7 +274,8 @@ const themes: Theme[] = [
margin-bottom: var(--space-m);
}

.theme-header h2 {
.theme-header h2,
.theme-header h3 {
margin-bottom: var(--space-xs);
}

Expand Down
35 changes: 0 additions & 35 deletions src/components/ExternalLink.astro

This file was deleted.

5 changes: 3 additions & 2 deletions src/components/Feature.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { Heading } from 'accessible-astro-components'
import { Icon } from 'astro-icon/components'

/**
Expand All @@ -21,9 +22,9 @@ const { icon = 'mdi:rocket', title = 'Title' }: Props = Astro.props
---

<div class="feature flex flex-col gap-4">
<Icon name={icon} />
<Icon aria-hidden="true" name={icon} />
<div class="content">
<h3 class="text-2xl font-bold">{title}</h3>
<Heading level="h3" size="h6" class="mb-2">{title}</Heading>
<p>
<slot>Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic, corporis.</slot>
</p>
Expand Down
Loading