Files
timeline-frontend/ACCESSIBILITY_CHECKLIST.md
jhao 5a0aa2b3c1
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
feat: 添加评论、反应、离线编辑及主题定制功能
- 实现评论系统,包括评论输入、列表展示和集成指南
- 添加反应功能组件(ReactionBar、ReactionButton、ReactionPicker)
- 实现离线编辑支持,包括同步状态管理和冲突解决
- 添加主题定制功能,支持多种配色方案和主题预览
- 新增多视图布局选项(时间线、分组、砌体视图)
- 实现个人资料编辑器,支持头像、简介和自定义字段编辑
- 添加统计页面,展示存储使用情况和上传趋势
- 新增相册管理功能,支持相册创建、编辑和照片管理
- 实现响应式设计和加载骨架屏组件
- 扩展国际化支持,新增孟加拉语、波斯语、印尼语、日语、葡萄牙语等语言
- 添加错误边界组件和离线指示器
- 更新配置文件、路由和依赖项
- 新增完整的文档、测试用例和集成指南
2026-02-25 15:02:05 +08:00

6.1 KiB

Accessibility Checklist

This document provides a checklist for ensuring accessibility compliance across the Timeline application.

General Principles

  • All interactive elements are keyboard accessible
  • Focus indicators are visible for keyboard navigation
  • Color is not the only means of conveying information
  • Text has sufficient contrast ratio (WCAG AA: 4.5:1 for normal text, 3:1 for large text)
  • Touch targets are at least 44x44px
  • Content is responsive and works on mobile devices

Semantic HTML

  • Use semantic HTML elements (<nav>, <main>, <article>, <section>, etc.)
  • Headings follow logical hierarchy (h1 → h2 → h3)
  • Lists use proper list markup (<ul>, <ol>, <li>)
  • Forms use proper form elements with labels
  • Buttons use <button> element (not <div> with click handlers)
  • Links use <a> element with proper href

ARIA Attributes

Required ARIA Labels

  • Interactive elements without visible text have aria-label
  • Icon buttons have descriptive aria-label
  • Form inputs have associated labels or aria-label
  • Landmarks have aria-label when multiple of same type exist

ARIA States

  • Expandable elements use aria-expanded
  • Selected items use aria-selected
  • Checked items use aria-checked
  • Disabled elements use aria-disabled
  • Loading states use aria-busy
  • Hidden content uses aria-hidden

ARIA Roles

  • Custom widgets have appropriate roles
  • Live regions use aria-live for dynamic content
  • Dialogs use role="dialog" and aria-modal="true"
  • Alerts use role="alert" or aria-live="assertive"

Keyboard Navigation

Focus Management

  • Focus order follows logical reading order
  • Focus is trapped in modals/dialogs
  • Focus returns to trigger element when modal closes
  • Skip links provided for main content
  • No keyboard traps (user can always navigate away)

Keyboard Shortcuts

  • Enter/Space activates buttons and links
  • Escape closes modals and dropdowns
  • Arrow keys navigate lists and menus
  • Tab/Shift+Tab moves between focusable elements
  • Home/End navigate to first/last item in lists

Forms

  • All inputs have associated labels
  • Required fields are marked with required attribute
  • Error messages are associated with inputs using aria-describedby
  • Form validation provides clear error messages
  • Success messages are announced to screen readers
  • Placeholder text is not used as labels

Images

  • All images have alt text
  • Decorative images have empty alt="" or aria-hidden="true"
  • Complex images have detailed descriptions
  • Icons have text alternatives or aria-label

Media

  • Videos have captions/subtitles
  • Audio content has transcripts
  • Auto-playing media can be paused
  • Media controls are keyboard accessible

Color and Contrast

  • Text contrast meets WCAG AA standards (4.5:1)
  • Large text contrast meets WCAG AA standards (3:1)
  • UI components have sufficient contrast (3:1)
  • Focus indicators have sufficient contrast
  • Information is not conveyed by color alone

Responsive Design

Mobile (< 768px)

  • Content is readable without horizontal scrolling
  • Touch targets are at least 44x44px
  • Text is at least 16px to prevent zoom on iOS
  • Navigation is accessible on mobile
  • Forms are easy to complete on mobile

Tablet (768px - 1024px)

  • Layout adapts appropriately
  • Touch and mouse interactions both work
  • Content is readable and usable

Desktop (> 1024px)

  • Layout uses available space effectively
  • Keyboard navigation works smoothly
  • Hover states are visible

Motion and Animation

  • Animations respect prefers-reduced-motion
  • Auto-playing animations can be paused
  • Animations don't cause seizures (no flashing > 3 times/second)
  • Parallax effects have alternatives

Screen Reader Testing

Test with:

  • NVDA (Windows)
  • JAWS (Windows)
  • VoiceOver (macOS/iOS)
  • TalkBack (Android)

Verify:

  • All content is announced
  • Navigation is logical
  • Form labels are read correctly
  • Error messages are announced
  • Dynamic content updates are announced
  • Images have meaningful descriptions

Component-Specific Checks

Albums

  • Album cards have descriptive labels
  • Photo grid is keyboard navigable
  • Drag-and-drop has keyboard alternative
  • Delete confirmations are accessible

Comments

  • Comment form has proper labels
  • Character counter is announced
  • Submit button is keyboard accessible
  • Edit/delete buttons have clear labels
  • New comments are announced

Reactions

  • Reaction buttons have descriptive labels
  • Current user reaction is indicated
  • Reaction counts are announced
  • Reaction picker is keyboard accessible

Statistics

  • Charts have text alternatives
  • Data tables are properly structured
  • Trends are described in text

Theme Customizer

  • Theme options are keyboard accessible
  • Color picker has keyboard support
  • Preview updates are announced

Profile Editor

  • Cover photo upload is keyboard accessible
  • Crop tool has keyboard controls
  • Custom fields are properly labeled
  • Visibility toggles are clear

Testing Tools

Automated Testing

  • axe DevTools
  • WAVE
  • Lighthouse Accessibility Audit
  • Pa11y

Manual Testing

  • Keyboard-only navigation
  • Screen reader testing
  • Zoom to 200%
  • High contrast mode
  • Color blindness simulation

Resources

Notes

  • This checklist is based on WCAG 2.1 Level AA standards
  • Regular accessibility audits should be conducted
  • User testing with people with disabilities is recommended
  • Accessibility is an ongoing process, not a one-time task