Skip to content

Commit f723f89

Browse files
authored
feat: Added Accessibility section to the Development and CONTRIBUTING guides (#517)
1 parent d237663 commit f723f89

File tree

5 files changed

+107
-16
lines changed

5 files changed

+107
-16
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,29 @@ Before submitting code changes:
5656
```bash
5757
make test
5858
```
59+
60+
## ♿ Accessibility
61+
Accessibility is a core consideration for this project. While OnDemand Loop is not fully compliant with accessibility standards (such as WCAG 2.1 or Section 508), we strive for **incremental improvements** with every change.
62+
63+
When contributing, please:
64+
65+
- **Review the [Accessibility Guidelines](https://iqss.github.io/ondemand-loop/development_guide/accessibility.md)** before submitting UI changes.
66+
- **Follow best practices**:
67+
- Use semantic HTML elements and landmarks.
68+
- Ensure all functionality is available via keyboard.
69+
- Provide descriptive labels for form inputs and interactive elements.
70+
- Maintain sufficient color contrast.
71+
- Apply ARIA attributes only when necessary and correctly.
72+
- **Run accessibility checks** using tools such as:
73+
- [axe DevTools](https://www.deque.com/axe/devtools/)
74+
- [Lighthouse](https://developers.google.com/web/tools/lighthouse)
75+
- [WAVE](https://wave.webaim.org/)
76+
- **Call out accessibility considerations in your PR description**:
77+
- Mention improvements you made (e.g., added keyboard support, improved labels).
78+
- Flag any known limitations so reviewers can double-check.
79+
80+
Even small contributions to accessibility make a meaningful difference. Please treat every change as an opportunity to improve inclusivity and avoid regressions.
81+
5982
## ✅ Pull Requests
6083
After completing your changes, open a Pull Request (PR):
6184
- Link it to the relevant issue.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Accessibility Guidelines
2+
3+
### Why Accessibility Matters
4+
Accessibility ensures that people of all abilities can use OnDemand Loop effectively.
5+
Accessible features often improve the overall usability of the product, reduce friction for everyone, and demonstrate respect for our diverse user base.
6+
Building with accessibility in mind also reduces long-term maintenance costs by avoiding retrofits.
7+
8+
### Current State of Accessibility
9+
We have implemented several accessibility-conscious practices across the application, such as:
10+
11+
- Using semantic HTML where possible
12+
- Applying ARIA labels to clarify the purpose of interactive components for assistive technologies
13+
- Providing keyboard navigation for primary workflows so users are not blocked by pointer-only interactions
14+
- Improving color contrast between text and backgrounds in core UI areas
15+
16+
These measures improve the experience, but the application is **not fully compliant with accessibility standards** (e.g., WCAG, Section 508).
17+
While we strive to follow best practices, the current state should not be interpreted as certification or full accessibility compliance.
18+
19+
### Developer Responsibility
20+
Every change to the application is an opportunity to improve accessibility. When developing new features or modifying existing ones, you should:
21+
22+
- Favor semantic HTML elements and landmarks to convey structure and meaning (avoid relying only on `<div>` and `<span>`)
23+
- Ensure all interactive elements (buttons, links, inputs) are accessible via keyboard
24+
- Provide clear and descriptive labels for inputs and form controls (visible label, `aria-label`, or equivalent association)
25+
- Check that color contrast meets at least minimum accessibility requirements
26+
- Apply ARIA attributes only where necessary and ensure they remain in sync with component state
27+
- Test new functionality with keyboard navigation and screen reader tools when possible
28+
29+
### Limitations
30+
At this stage, the application does not guarantee compliance with any accessibility standard.
31+
32+
Our goal is **incremental improvement**—making the application more accessible over time without giving a false impression of full accessibility.
33+
34+
### Quick Checklist for Developers
35+
Before submitting your changes, review the following:
36+
37+
- [ ] Did I use semantic HTML tags and landmarks appropriately?
38+
- [ ] Can I navigate my feature entirely with a keyboard?
39+
- [ ] Do all inputs and interactive elements have clear, accessible labels or names?
40+
- [ ] Is the color contrast sufficient for text and essential UI elements?
41+
- [ ] Did I avoid unnecessary or incorrect ARIA attributes, and keep them in sync with UI state?
42+
- [ ] Did I test the main user paths with keyboard navigation or assistive tools?
43+
44+
45+
---
46+
47+
By keeping accessibility in mind with every change, we ensure steady progress toward a more inclusive application. Even small improvements add up over time.
48+
49+
!!! info "Testing Tools and Resources"
50+
51+
**Accessibility Testing Tools:**
52+
53+
- [WAVE Web Accessibility Evaluation Tool](https://wave.webaim.org/) — Browser extension for identifying accessibility issues
54+
- [axe DevTools](https://www.deque.com/axe/devtools/) — Browser extension for automated accessibility testing
55+
- [Lighthouse Accessibility Audit](https://developers.google.com/web/tools/lighthouse) — Built into Chrome DevTools
56+
- [NVDA Screen Reader](https://www.nvaccess.org/) — Free screen reader for testing (Windows)
57+
- [VoiceOver](https://www.apple.com/accessibility/vision/) — Built-in screen reader for macOS
58+
59+
**Standards Reference:**
60+
61+
- [WCAG 2.1 Guidelines](https://www.w3.org/TR/WCAG21/) — Web Content Accessibility Guidelines (A and AA levels)
62+
- [WebAIM Resources](https://webaim.org/) — Practical accessibility guidance and tutorials

docs/guide/content/development_guide/e2e_tests.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
OnDemand Loop uses [Cypress](https://cypress.io) for end-to-end (E2E) automated testing. These tests verify that the application works correctly from a user's perspective by simulating real interactions with the browser interface.
44

5-
## Overview
5+
### Overview
66

77
The automated tests are located in the `e2e_tests/` directory and provide:
88

99
- **End-to-end testing** of critical user workflows
1010
- **Docker-based execution** for consistency across development and CI/CD environments
1111
- **GitHub Actions integration** for automated testing on code changes
1212

13-
### Test Structure
13+
#### Test Structure
1414

1515
```
1616
e2e_tests/
@@ -26,15 +26,15 @@ e2e_tests/
2626
└── docker-compose.yml # Test environment setup
2727
```
2828

29-
## Running Tests Locally
29+
### Running Tests Locally
3030

31-
### Prerequisites
31+
#### Prerequisites
3232

3333
- Docker and Docker Compose installed
3434
- Make utility
3535
- Access to test credentials (see [Local Environment](local_environment.md))
3636

37-
### Quick Start
37+
#### Quick Start
3838

3939
1. **Start the test environment:**
4040

@@ -64,7 +64,7 @@ make cypress_run
6464
make clean
6565
```
6666

67-
### Available Make Targets
67+
#### Available Make Targets
6868

6969
| Target | Description |
7070
|--------|-------------|
@@ -77,7 +77,7 @@ make clean
7777
| `cypress_run` | Run Cypress tests headless |
7878
| `clean` | Stop environment and clean up artifacts |
7979

80-
### Environment Variables
80+
#### Environment Variables
8181

8282
Configure tests using these environment variables:
8383

@@ -93,9 +93,9 @@ Example:
9393
CYPRESS_SPEC=cypress/e2e/homepage.cy.js make cypress_run
9494
```
9595

96-
## Writing Tests
96+
### Writing Tests
9797

98-
### Test Structure
98+
#### Test Structure
9999

100100
Follow this pattern for new tests:
101101

@@ -116,7 +116,7 @@ describe('Feature Name', () => {
116116
})
117117
```
118118

119-
### Best Practices
119+
#### Best Practices
120120

121121
1. **Use data attributes** for element selection:
122122
```html
@@ -147,21 +147,21 @@ describe('Feature Name', () => {
147147
})
148148
```
149149

150-
## Adding New Tests
150+
#### Adding New Tests
151151

152152
1. **Create test files** in `cypress/e2e/` with the `.cy.js` extension
153153
2. **Follow naming conventions**: `feature-name.cy.js`
154154
3. **Import/create required utilities**
155155

156-
## CI/CD Integration
156+
#### CI/CD Integration
157157

158158
Tests run automatically in GitHub Actions on:
159159

160160
- **Push to main branch** with changes to `application/` or `e2e_tests/`
161161
- **Pull requests** targeting main branch with changes to `application/` or `e2e_tests/`
162162
- **Manual workflow dispatch**
163163

164-
### GitHub Actions Workflow
164+
#### GitHub Actions Workflow
165165

166166
The workflow (`.github/workflows/e2e-tests.yml`) performs:
167167

@@ -172,16 +172,16 @@ The workflow (`.github/workflows/e2e-tests.yml`) performs:
172172
5. **Run tests** with `make cypress_run`
173173
6. **Upload artifacts** (results, screenshots) on failure
174174

175-
### Test Artifacts
175+
#### Test Artifacts
176176

177177
When tests fail, the following artifacts are automatically uploaded:
178178

179179
- **Screenshots** from failed tests
180180
- **Test results** in JUnit XML format
181181

182-
## Troubleshooting
182+
### Troubleshooting
183183

184-
### Debugging Tests
184+
#### Debugging Tests
185185

186186
1. **View environment logs:**
187187
```bash

docs/guide/content/development_guide/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ The documentation is organized by topic to help you find what you need quickly:
4343
- [Contributing a Change](contributing.md)
4444
Best practices and workflow for contributing code or documentation.
4545

46+
- [Accessibility Guidelines](accessibility.md)
47+
Practices taken into account to make the application accessible.
48+
4649
- [Testing](testing.md)
4750
How the Rails test suite is structured and executed using the provided Make targets.
4851

docs/guide/mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ nav:
4646
- Open OnDemand: development_guide/ood.md
4747
- Dataverse Integration: development_guide/dataverse_integration.md
4848
- Contributing a Change: development_guide/contributing.md
49+
- Accessibility Guidelines: development_guide/accessibility.md
4950
- Testing: development_guide/testing.md
5051
- Manual Testing: development_guide/manual_testing.md
5152
- E2E Tests: development_guide/e2e_tests.md
@@ -59,6 +60,8 @@ markdown_extensions:
5960
- admonition
6061
- footnotes
6162
- tables
63+
- pymdownx.tasklist:
64+
custom_checkbox: true
6265
- pymdownx.highlight:
6366
anchor_linenums: true
6467
linenums: false

0 commit comments

Comments
 (0)