Chart accessibility.

Build charts that convey meaning beyond color and pointer interaction.

Color, contrast, and motion

#
  • Distinguish beyond color Combine series names, legends, marker shapes, and direct labels. Do not convey success or failure through color alone.
  • Contrast Inspect text, axes, lines, and focus rings on light and dark backgrounds. Use custom logo assets that remain readable on both.
  • Reduced motion Control animated using the operating system's prefers-reduced-motion setting.
const media = matchMedia('(prefers-reduced-motion: reduce)');
const chart = document.querySelector('#trend');
const syncMotion = () => { chart.animated = !media.matches; };
media.addEventListener('change', syncMotion);
syncMotion();
// On disposal: media.removeEventListener('change', syncMotion);