diff --git a/.gitignore b/.gitignore index d436c6d..cf0866a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ yarn-error.log* # macOS-specific files .DS_Store + +# vscode settings and dictionaries +.vscode diff --git a/README.md b/README.md index 8984f5b..92d9935 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,125 @@ -# Welcome to [Astro](https://astro.build) +# Accessible Astro Starter -> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! +This starter project is build upon the (awesome) Astro static site builder. For their official documentation check their [GitHub repository](https://github.com/snowpackjs/astro). This starter offers a couple of Accessibility components and some utility classes to get you building your project faster. -## 🚀 Project Structure +[Checkout a demo here!](https://accessible-astro.markteekman.nl/) -Inside of your Astro project, you'll see the following folders and files: +## Accessibility features +In this starter you'll find a couple of things: + +- Accessible landmarks in the `DefaultLayout.astro` file such as `header`, `main` and `footer` +- Accessible landmark examples in the `index.astro` file such as `section` and `nav` +- `SkipLinks.astro` component to skip to either the main menu or the main content +- `Navigation.astro` component with keyboard accessible navigation (arrow keys, escape key) +- `DarkMode.astro` component toggle with accessible button and a user system preferred color scheme +- Outline focus indicator which works on dark and light backgrounds +- `.sr-only` token class for screen reader only text content + +## Other features + +This starter contains some extra Design System like utility classes to aid in the global layout of your project. All of this can be found in the `public/scss/base` directory, and compiles in the `globals.scss` file. Using these primitives is totally optional, use or remove at your own preference :) What it contains: + +- Reset file to reset browser defaults and ensure everything looks good +- Some basic font settings, such as responsive heading sizes +- Color shades for your color pallet, rendered to the `:root` of your website as custom properties +- Simple auto-grid setting using `display: grid` and a `data-attribute` +- A bit more advanced grid settings using `display` grid to easily setup a 12-column layout +- Utilities set in `_utility.scss` for things such as spacing, sizes, colors, and box-shadows + +### Using Auto Grid + +Simply apply the `data-auto-grid` attribute on your parent `div` with a number from 2-6 (if you need more columns just tweak the for loop in `_auto-grid.scss`). The grid automatically creates new rows (this is how `display: grid` works by default). + +```html +
First column
+Second column
+Third column
+I'm a bigger font size!
+