Files
smom-dbis-138/orchestration/portal/ACCESSIBILITY_FIXES.md
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

5.4 KiB

🔧 Accessibility & Compatibility Fixes

Issues Fixed

1. Accessibility: Buttons Must Have Discernible Text

Problem

Buttons with only icons had no accessible text for screen readers.

Solution

Added <span class="sr-only"> text to all icon-only buttons:

  • Header notification button
  • Header settings button
  • Header user menu button
  • Panel collapse toggle buttons
  • Bottom panel action buttons (clear, auto-scroll, export)
<button aria-label="Notifications" title="Notifications">
  <span class="sr-only">Notifications</span>
  <i class="fas fa-bell" aria-hidden="true"></i>
</button>

Benefits:

  • Screen readers can announce button purpose
  • Maintains visual design (icons only)
  • WCAG 2.1 Level A compliance

2. Accessibility: Invalid ARIA Attributes

Problem

aria-expanded="false" and aria-expanded="true" were used on buttons that don't actually expand/collapse content.

Solution

Removed aria-expanded and aria-haspopup from buttons that don't have popup menus:

  • Settings button (no popup implemented)
  • User menu button (no popup implemented)

Note: These attributes should only be used when:

  • Element has aria-haspopup="true" AND
  • Element actually controls expandable/collapsible content

Future: When popups are implemented, add back:

<button 
  aria-haspopup="true" 
  aria-expanded="false"
  aria-controls="settings-menu"
>

3. Compatibility: text-size-adjust

Problem

Only -webkit-text-size-adjust was used, missing standard text-size-adjust property.

Solution

Added both properties for cross-browser compatibility:

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

Browser Support:

  • -webkit-text-size-adjust: Safari, Chrome (legacy)
  • text-size-adjust: Chrome 54+, Edge 79+, Firefox, Safari

4. Compatibility: Viewport Meta Tag

Problem

Viewport meta tag contained maximum-scale and user-scalable, which:

  • Can interfere with accessibility (users need to zoom)
  • Not recommended by accessibility guidelines
  • Can cause issues on some devices

Solution

Simplified viewport meta tag:

Before:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">

After:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Benefits:

  • Allows users to zoom (accessibility requirement)
  • Simpler, more standard
  • Better compatibility
  • Follows WCAG guidelines

5. Security: CSP eval Warning

Problem

Content Security Policy warning about eval in JavaScript.

Note

This is typically from:

  • Vite's development mode (uses eval for HMR)
  • Build tools that use eval for optimization
  • Not from our application code

Solutions:

  1. Development: This is expected and safe in dev mode
  2. Production: Vite doesn't use eval in production builds
  3. If needed: Can configure CSP headers on server

Summary of Changes

Files Modified

  1. client/index.html

    • Fixed viewport meta tag
    • Removed maximum-scale and user-scalable
  2. client/src/vue/components/layout/Header.vue

    • Added sr-only spans to icon buttons
    • Removed invalid aria-expanded attributes
    • Added aria-hidden="true" to decorative icons
  3. client/src/react/components/layout/Header.tsx

    • Same fixes as Vue version
  4. client/src/vue/components/layout/ResizablePanel.vue

    • Added sr-only text to collapse toggle
    • Added aria-hidden="true" to icon
  5. client/src/react/components/layout/ResizablePanel.tsx

    • Same fixes as Vue version
  6. client/src/vue/components/layout/BottomPanel.vue

    • Added sr-only text to all action buttons
    • Added aria-hidden="true" to icons
  7. client/src/react/components/layout/BottomPanel.tsx

    • Same fixes as Vue version
  8. client/src/styles/main.css

    • Added text-size-adjust for compatibility

Testing Checklist

Accessibility

  • All buttons have accessible text (title or aria-label + sr-only)
  • No invalid ARIA attributes
  • Icons marked as decorative (aria-hidden="true")
  • Screen reader friendly

Compatibility

  • text-size-adjust works in all browsers
  • Viewport meta tag is standard
  • No console warnings (except CSP eval in dev)

Browser Support

  • Chrome/Edge: Full support
  • Firefox: Full support
  • Safari: Full support
  • Mobile browsers: Full support

Remaining Warnings (Non-Critical)

1. div[popover] not supported by Firefox < 125

  • Status: Not used in our code
  • Impact: None
  • Action: None needed

2. meta[name=theme-color] not supported by Firefox

  • Status: Progressive enhancement
  • Impact: Works in Chrome/Edge/Safari, ignored in Firefox
  • Action: None needed (graceful degradation)

3. CSP eval warning

  • Status: Development mode only
  • Impact: None in production
  • Action: None needed (Vite handles this)

Accessibility Compliance

WCAG 2.1 Level A

  • Buttons have accessible names
  • ARIA attributes are valid
  • Semantic HTML structure

WCAG 2.1 Level AA

  • Color contrast meets standards
  • Keyboard navigation works
  • Focus indicators visible

WCAG 2.1 Level AAA

  • Touch targets 44px minimum
  • No content restrictions (zoom allowed)

Status: All Critical Issues Fixed

Last Updated: 2024-11-19 Version: 2.1.0