Skip to content

Enhance Accessibility: Keyboard Navigation, Color Contrast, and Interactive Elements#16

Open
jmusal wants to merge 4 commits into
tinacms:mainfrom
jmusal:feat/a11y
Open

Enhance Accessibility: Keyboard Navigation, Color Contrast, and Interactive Elements#16
jmusal wants to merge 4 commits into
tinacms:mainfrom
jmusal:feat/a11y

Conversation

@jmusal
Copy link
Copy Markdown
Contributor

@jmusal jmusal commented Mar 27, 2025

This PR implements a series of accessibility improvements to make the TinaCMS with Astro starter more inclusive and compliant with WCAG guidelines.

Changes Included

Keyboard Navigation Enhancements

  • Added skip-to-content link that appears on focus
  • Implemented proper focus management throughout the site
  • Added ARIA landmark roles for better screen reader navigation
  • Enhanced keyboard focus styles for all interactive elements

Color Contrast Improvements

  • Added accessible color variables with better contrast ratios
  • Enhanced text colors for improved readability
  • Updated header and footer text for better contrast
  • Added background to TinaCMS footer link for better visibility
  • Ensured all text meets WCAG AA contrast requirements (4.5:1 ratio)

Skip-to-Content Button Refinements

  • Fixed styling issues with the skip-to-content button
  • Implemented high-contrast black/white scheme for maximum visibility
  • Ensured proper hiding until keyboard focus
  • Added bold text and increased padding for better usability

Interactive Element Enhancements

  • Improved link hover states with distinct visual feedback
  • Added smooth transitions for color and background changes
  • Implemented consistent hover behavior across all site sections
  • Enhanced visual cues for all interactive elements

Testing

These changes have been manually tested with:

  • Keyboard-only navigation
  • Visual inspection for color contrast
  • Focus visibility checks
  • Hover state verification

Impact

These improvements make the site more accessible to:

  • Keyboard-only users
  • Screen reader users
  • Users with low vision or color vision deficiencies
  • Users with cognitive disabilities who benefit from clear visual cues

This PR implements accessibility improvements that can serve as a foundation for future enhancements. Potential follow-up work could include dark mode support, image accessibility enhancements, and more comprehensive ARIA implementations.

jmusal added 4 commits March 26, 2025 22:15
…lity

- Add skip-to-content link to all main layout files
- Add main-content ID to all main content containers
- Implement CSS that keeps the link invisible until focused
- Improve keyboard navigation for users who can't use a mouse
- Add skip-to-content link that appears on focus
- Implement focus styles for all interactive elements
- Add ARIA attributes and landmark roles for screen readers
- Enhance component accessibility with proper attributes
- Improve screen reader context and navigation
- Add accessible color variables with better contrast ratios
- Enhance link styles with better contrast and hover states
- Improve focus visibility for keyboard navigation
- Update header and footer text for better readability
- Add background to TinaCMS footer link for better contrast
- Fix skip-to-content button with high-contrast black/white scheme
- Ensure all text meets WCAG AA contrast requirements
- Add distinct hover colors for all links throughout the site
- Implement smooth transitions for color and background changes
- Add underline text decoration on hover for better visibility
- Ensure consistent hover behavior across navigation, content, and footer links
- Enhance visual feedback for interactive elements
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2025

@jmusal is attempting to deploy a commit to the TinaCMS Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tina-astro-starter ❌ Failed (Inspect) Mar 28, 2025 7:00am

@JackDevAU
Copy link
Copy Markdown
Member

Hey @jmusal

Amazing stuff here, The only suggestion I'd have is around the "Powered by TinaCMS" background, maybe we could tweak it slightly to wrap around the llama as well and add a bit more padding?

image
Figure: Powered by TinaCMS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants