ELFBAR

Accessibility

ELFBAR Design System accessibility guidelines to ensure all users can use the product.

Accessibility (a11y) ensures that all users — including those using assistive technologies — can effectively use the product.

Core Principles

WCAG 2.1 AA Compliance

The design system targets WCAG 2.1 AA compliance:

  • Perceivable — Information and UI components can be perceived by users
  • Operable — UI components and navigation can be operated
  • Understandable — Information and operation are understandable
  • Robust — Content can be reliably interpreted by a wide variety of user agents

Color Contrast

ContextMinimum RatioNotes
Body text4.5:1--ds-color-text-primary against background
Large text (≥18px bold / ≥24px)3:1Headings, button labels
Non-text elements3:1Icons, borders, focus indicators
Decorative elementsNonePure decoration, conveys no information

Brand Color Considerations

  • ELFBAR brand pink (accent1) may have insufficient contrast against white backgrounds in light mode — use with caution for text
  • Important action text should always use --ds-color-text-white-primary against brand color backgrounds
  • Brand colors in dark mode are lightened to ensure readability

Keyboard Navigation

All interactive components must support keyboard operation:

KeyBehavior
TabMove forward through focusable elements
Shift + TabMove backward through focusable elements
Enter / SpaceActivate buttons, links
EscapeClose dialogs, menus, popovers
Arrow KeysMove within option groups (Radio, Menu, Tabs)
Home / EndJump to first/last option

Focus Management

  • Focus indicators use a 2px solid outline with color --ds-color-brand-accent1-default
  • Focus must not be trapped inside components (focus trapping is only used for modal dialogs)
  • When a dialog opens, focus moves into it; when closed, focus returns to the trigger element

ARIA Attributes

Common Component ARIA Patterns

ComponentRequired Attributes
Buttonrole="button", aria-disabled, aria-pressed (toggle)
Checkboxrole="checkbox", aria-checked (supports mixed)
Radiorole="radio", aria-checked, role="radiogroup" wrapper
Dialogrole="dialog", aria-modal="true", aria-labelledby
Tabsrole="tablist", role="tab", role="tabpanel", aria-selected
Menurole="menu", role="menuitem", aria-expanded
Searchrole="search", aria-label
Badgearia-label describing the count meaning
Alertrole="alert", aria-live="assertive"

Screen Readers

  • All images have meaningful alt text
  • Decorative icons use aria-hidden="true"
  • State changes are announced via aria-live regions
  • Form errors are associated with their input (aria-describedby)

Testing Checklist

  • Complete all operations using keyboard only
  • Test flows with a screen reader (VoiceOver / NVDA)
  • Check all text color contrast ≥ 4.5:1
  • Verify focus indicators are visible on all components
  • Verify color contrast in dark mode