# Quick Start Guide Get started with AccessibleDjango in just a few minutes! ## Installation First, install AccessibleDjango: ```bash pip install accessible-django ``` Add it to your `INSTALLED_APPS` in `settings.py`: ```python INSTALLED_APPS = [ # ... other apps 'accessible_django', ] ``` ## Your First Accessibility Check ### 1. Create a Template with Issues Let's create a template with some accessibility issues to see AccessibleDjango in action. Create `templates/example.html`: ```html
```
### 2. Run the Accessibility Check
Run Django's system check:
```bash
python manage.py check
```
You should see output like:
```
System check identified some issues:
WARNINGS:
accessible_django.W001: Missing alt attribute in
```
### 4. Verify the Fixes
Run the check again:
```bash
python manage.py check
```
You should now see:
```
System check identified no issues (0 silenced).
```
🎉 Congratulations! Your template is now more accessible!
## Integration with Development Workflow
### During Development
AccessibleDjango checks run automatically when you start the development server:
```bash
python manage.py runserver
```
Any accessibility issues will be displayed in the console before the server starts.
### In CI/CD Pipelines
Add accessibility checks to your CI/CD pipeline:
```yaml
# .github/workflows/ci.yml
- name: Run Django Checks
run: |
python manage.py check --deploy
```
### Pre-commit Hooks
You can also run checks as a pre-commit hook. Create `.git/hooks/pre-commit`:
```bash
#!/bin/bash
python manage.py check
if [ $? -ne 0 ]; then
echo "Accessibility checks failed. Please fix the issues before committing."
exit 1
fi
```
Make it executable:
```bash
chmod +x .git/hooks/pre-commit
```
## Understanding Alt Text
### When to Use Alt Text
Alt text should describe the content and function of an image:
```html
```
### Decorative Images
For purely decorative images, use an empty alt attribute:
```html
```
> [!NOTE]
> An empty `alt=""` is different from a missing alt attribute. Empty alt tells screen readers to skip the image, which is appropriate for decorative images.
### Functional Images
For images that are links or buttons, describe the action:
```html
```
### Product Images
```html
```
### Avatar Images
```html
```
## Next Steps
- Read the [User Guide](user_guide.md) for comprehensive documentation
- Check the [API Reference](api/index.md) for technical details
- Learn about [Contributing](contributing.md) to AccessibleDjango
## Getting Help
If you encounter any issues:
1. Check the [Troubleshooting](installation.md#troubleshooting) section
2. Search [existing issues](https://github.com/JohananOppongAmoateng/AccessibleDjango/issues)
3. Open a [new issue](https://github.com/JohananOppongAmoateng/AccessibleDjango/issues/new) if needed