FSOC-OSS / FSOC-OSS/Fsoc-level-hard

Implement Keyboard Shortcuts and Accessibility Features

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
a11y accessibility enhancement hacktoberfest intermediate
Dominant language
JavaScript
Stars
1
Forks
21
PR merge metrics
No merged PRs in 30d

Description

**Title:** Add Comprehensive Keyboard Navigation and WCAG 2.1 AA Compliance

## Problem Statement

The application lacks proper keyboard navigation and accessibility features, making it difficult or impossible for users with disabilities to use the quiz app. Compliance with WCAG guidelines is essential for inclusive design.

## Proposed Solution

Implement comprehensive accessibility features including:

* Full keyboard navigation for all interactive elements
* Keyboard shortcuts for common actions
* ARIA labels and roles for screen readers
* Focus management and visible focus indicators
* Keyboard shortcut reference modal
* Alt text for all images

## Acceptance Criteria

### ✅ Keyboard Navigation

* Tab through all interactive elements in logical order
* Shift+Tab for reverse navigation
* Enter/Space to activate buttons and links
* Arrow keys for radio buttons and dropdowns
* Escape to close modals and cancel actions
* Focus trap in modals and overlays

### ✅ Keyboard Shortcuts

* 1-4 or A-D to select answer options
* Enter to submit answer
* N for next question (after submission)
* P for previous question (if allowed)
* / to focus search bar
* ? to open keyboard shortcuts reference
* Ctrl+H to go home
* Ctrl+S to open settings

### ✅ Keyboard Shortcuts Modal

* Accessible via ? key or help menu
* Table of all shortcuts with descriptions
* Grouped by context (Quiz, Navigation, General)
* Search/filter shortcuts list
* Printable version
* Close with Escape or close button

### ✅ ARIA Implementation

* Add appropriate ARIA roles to all elements
* ARIA labels for icon-only buttons
* ARIA live regions for dynamic content
* ARIA expanded states for dropdowns
* ARIA describedby for form hints
* ARIA invalid for error states

### ✅ Focus Management

* Visible focus indicators on all interactive elements
* High contrast focus outlines
* Focus first element in modals when opened
* Return focus to trigger element when modal closes
* Skip to main content link at page top
* Focus management during route changes

### ✅ Screen Reader Support

* Alt text for all images and icons
* Descriptive link text (no "click here")
* Announce dynamic content changes
* Announce page title on route change
* Label form inputs properly
* Error messages associated with inputs

### ✅ Additional Accessibility

* Color contrast meets WCAG AA standards (4.5:1)
* Don't rely on color alone for information
* Sufficient target sizes (44x44px minimum)
* Avoid flashing content (seizure risk)
* Provide text alternatives for visual content
* Support browser zoom up to 200%

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.