Vibe Coding Charts? 10 Accessibility Mistakes Your AI Is Making

Vibe coding, the practice of using AI to write code by describing what you want in plain language, is exploding. Coined by Andrej Karpathy at Tesla, the term has seen 6,700% search growth in the last year alone. Developers are using Claude, ChatGPT, and other LLMs to generate entire dashboards and chart systems in seconds. The speed advantage is real.

But there is a problem. AI-generated charts almost always fail basic WCAG compliance. The code comes out fast, but it comes out broken. Color palettes with no thought to colorblindness. Legends instead of labels. No alt text. No keyboard support. Missing data tables. No reduced-motion protection.

This post identifies the 10 accessibility errors that AI makes most often when generating charts. Recognizing these patterns will help you catch them before they ship, and knowing the fixes will get you to accessible output in seconds.

300M People with color vision deficiency worldwide
8% Of men affected by color blindness
6,700% Growth in vibe coding searches, 2025
1

Color-Only Encoding

WCAG 1.4.1 Use of Color · Level A

This is the single most common accessibility failure in charts. When color is the only way to tell data series apart, anyone with color vision deficiency is left guessing. And it is not a small group: deuteranomaly (difficulty distinguishing red and green) alone affects 2.3% of the global population.

Why AI makes this mistake: AI models tend to generate visually harmonious palettes; lots of blues, gradient shades, pastels. Perceptually distinct colors (high contrast between hues) are harder to generate than a smooth gradient, so AI defaults to the easier path. The model optimizes for visual beauty, not accessibility.

The pie chart below uses five shades of red. On a normal monitor, you might be able to squint and tell them apart. Through the eyes of someone with protanopia or deuteranopia, these slices are functionally identical.

Don't: Similar colors, no labels
Pie chart using five similar shades of red with no data labels, making slices indistinguishable for colorblind users
Do: Distinct colors, data labels
Pie chart with five visually distinct colors (blue, green, orange, red, purple) and percentage labels on each slice

Who this excludes

Approximately 300 million people with color vision deficiency. The most common types are deuteranomaly (2.3% of the population) and protanomaly (0.5%), both of which make red-green distinctions unreliable. Tritanomaly (blue-yellow) is rarer but still affects real users.

How to fix it

Never rely on color alone. Layer in additional visual channels:

  • Use perceptually distinct colors (blue, green, orange, red, purple rather than five shades of one hue)
  • Add data labels directly on chart elements with names and values
  • Use different marker shapes on scatter/line charts (circles, squares, triangles, diamonds)
  • Use different line styles (solid, dashed, dotted, dash-dot)
  • For heat maps, overlay numerical values on cells in addition to color gradients
2

Low Contrast Ratios

WCAG 1.4.11 Non-text Contrast · Level AA

WCAG requires a minimum contrast ratio of 3:1 for graphical elements and 4.5:1 for text. But chart libraries often ship with default color palettes that were designed to look "modern" and "clean" rather than to be readable. Light grays on white backgrounds, pastel-on-pastel combinations, thin lines that blend into the grid, all of these fail basic contrast requirements.

Why AI makes this mistake: AI optimizes for aesthetic appeal. Light grays on white backgrounds look minimal and "clean"; modern design favors subtle gradients and pale colors. But this is the opposite of accessible. AI does not optimize for contrast because contrast is not part of visual harmony training data. You have to tell it explicitly.

The chart below is an extreme (but not uncommon) example. Light gray bars, light gray text, light gray legend items on a white background. It looks "sleek" to the designer who made it. It is functionally invisible to anyone with low vision, and it is difficult to read for everyone on a bright screen or cheap monitor.

Don't: Ghost chart
Bar chart with very light gray bars and labels on white background, extremely difficult to read with poor contrast ratios
Do: Strong contrast + data labels
Bar chart with strong blue and black bars on white background, clear dark text labels, and dollar values displayed on each bar

Who this excludes

253 million people globally with low vision. Also impacts users with age-related macular degeneration, anyone viewing the chart on a low-quality monitor or in bright sunlight, and users experiencing eye strain or fatigue. When combined with color blindness, this can make charts unusable for 15-20% of users.

How to fix it

Stick to these minimum ratios and test every element:

  • Graphical elements (bars, lines, data points, borders): minimum 3:1 against background
  • Text (axis labels, legends, annotations): minimum 4.5:1 against background
  • Large text (18pt+ or 14pt bold): minimum 3:1
  • Test with tools like the WebAIM Contrast Checker
  • When in doubt, go darker. #333333 on white gives you 12.6:1, which is comfortable for everyone
3

Missing or Inadequate Alt Text

WCAG 1.1.1 Non-text Content · Level A

Screen readers cannot interpret pixels. When a chart image has alt="" or alt="Chart" or, worse, no alt attribute at all, a screen reader user gets zero information. This is a Level A failure, the most basic level of WCAG compliance, and it is shockingly common.

Why AI makes this mistake: AI-generated chart code almost never includes meaningful alt text. You get alt="chart" at best, maybe alt="bar chart showing data". AI generates the visual but skips the semantic layer entirely because the training data (code examples, documentation) rarely shows good alt text examples. You have to add this manually or prompt specifically for it.

The fix is not just slapping a one-liner on the image tag. Good alt text for charts needs to convey the insight, not just describe the chart type. There is a big difference between "Bar chart of sales data" and "Bar chart showing 75% revenue growth from Q1 ($1.2M) to Q4 ($2.1M) in 2025, with consistent quarterly increases."

Who this excludes

The 41% of assistive technology users on JAWS and 38% on NVDA who rely on screen readers to understand web content. Also affects users with temporary vision impairments and anyone using text-based browsers or bandwidth-limited connections where images do not load.

How to fix it

Write alt text that describes what the chart tells you, not just what it looks like:

  • Bad: alt="Chart" or alt="Sales data"
  • Good: alt="Bar chart showing quarterly revenue rising from $1.2M in Q1 to $2.1M in Q4 2025"
  • Include the chart type, key data relationships, trends, and units
  • For complex charts, use a short alt text plus a longer <figcaption> or linked description
  • For interactive charts, mention that keyboard navigation is available
<!-- Bad -->
<img src="chart.png" alt="Chart">

<!-- Good -->
<figure>
  <img src="chart.png"
       alt="Bar chart: Revenue grew 75% from Q1 ($1.2M) to Q4 ($2.1M) in 2025">
  <figcaption>
    Revenue increased each quarter, with the steepest jump (+$300K)
    occurring between Q2 and Q3. All four regions contributed to growth.
  </figcaption>
</figure>
4

No Keyboard Navigation

WCAG 2.1.1 Keyboard · Level A

If your chart has interactive features (tooltips, drill-downs, zoom, filter controls) that only work with a mouse, you have locked out every user who navigates by keyboard. This includes people with motor disabilities, users with tremors or arthritis, voice control users, and power users who simply prefer the keyboard.

Why AI makes this mistake: Interactive chart code from AI lacks tabindex, ARIA roles, and keyboard event handlers by default. Most charting library examples show mouse interactions; keyboard support is an afterthought in the documentation. AI mirrors the examples, not the best practices. Adding keyboard support requires explicit prompts or manual code review.

This is another Level A failure. If someone cannot tab to a data point and press Enter to see its details, the interactive functionality does not exist for them.

Who this excludes

Users with motor disabilities who cannot use a mouse, people with tremors, arthritis, or limited dexterity, voice control software users, and an estimated 15-20% of users who rely on keyboard navigation at various points.

How to fix it

Implement full keyboard support for all interactive chart elements:

  • Tab/Shift+Tab: Navigate between major chart regions (legend, data series, axis)
  • Arrow keys: Move between data points within a series
  • Enter/Space: Activate tooltips or drill-down actions
  • Escape: Close tooltips or exit detailed views
  • Always show a visible focus indicator so keyboard users know where they are
  • Use proper ARIA roles: role="img" for static charts, role="application" for interactive ones
<!-- Interactive SVG chart element with keyboard support -->
<g role="img" aria-label="Interactive bar chart with 4 data points">
  <rect tabindex="0"
        role="button"
        aria-label="Q1 Revenue: $1,200,000"
        onfocus="showTooltip(this)"
        onblur="hideTooltip(this)"
        onkeydown="handleArrowKeys(event)">
  </rect>
</g>

If you are using a charting library, check whether it ships with an accessibility module. Highcharts, for example, includes a built-in accessibility module that handles keyboard navigation, screen reader announcements, and focus management out of the box when enabled.

5

Missing Data Tables as Alternatives

WCAG 1.3.1 Info and Relationships · Level A

A chart is a visual encoding of data. If you only provide the visual encoding and not the underlying data, you are forcing users to estimate values from pixel positions. That is imprecise for sighted users and impossible for screen reader users. A companion data table gives everyone access to exact values.

Why AI makes this mistake: AI generates the visual chart but never the companion data table. Most prompt examples ask for "a chart" or "a dashboard," not "a chart plus an accessible data table." The visual is what the user asked for, so that is all AI generates. The HTML table pattern is invisible to image-only training.

This does not mean you need to clutter your page with a massive table under every chart. A collapsible "View data table" link or a download option works perfectly. The point is that the data must be available in a non-visual format.

Who this excludes

Screen reader users who need exact values, users with cognitive disabilities who process tabular data more easily than visual charts, researchers who need to verify or extract precise numbers, and anyone who needs different modalities to process information effectively.

How to fix it

Provide an accessible data table alongside every chart:

  • Use semantic HTML: <table> with <thead>, <tbody>, and <th scope="col">
  • Include the same information the chart shows: categories, values, units
  • A "View data table" toggle/link keeps the visual clean while providing access
  • Offer a CSV or Excel download for users who want to work with the data
  • Some charting libraries (like Highcharts) can auto-generate data tables from chart config
<!-- Collapsible data table for a chart -->
<details>
  <summary>View data table</summary>
  <table>
    <thead>
      <tr>
        <th scope="col">Quarter</th>
        <th scope="col">Revenue (USD)</th>
        <th scope="col">Growth</th>
      </tr>
    </thead>
    <tbody>
      <tr><td>Q1 2025</td><td>$1,200,000</td><td>+5%</td></tr>
      <tr><td>Q2 2025</td><td>$1,500,000</td><td>+25%</td></tr>
      <tr><td>Q3 2025</td><td>$1,800,000</td><td>+20%</td></tr>
      <tr><td>Q4 2025</td><td>$2,100,000</td><td>+17%</td></tr>
    </tbody>
  </table>
</details>
6

Legend-Only Labeling

Usability + WCAG 3.3.5 Help · Level AAA

Legends force users into a constant lookup loop: look at the line, check its color, scan the legend, match the color, go back to the line, and repeat. This is cognitively expensive for everyone and disproportionately difficult for users with color vision deficiency, short-term memory challenges, or attention deficits.

Why AI makes this mistake: AI defaults to legend-based identification because that is what most chart library examples show. Highcharts examples, Chart.js templates, D3 code snippets all use legends as the primary labeling mechanism. AI mirrors what it sees in training data. Direct labeling requires custom code or library features that are not in basic examples.

The chart on the left relies entirely on the legend. The chart on the right uses direct labels at the end of each line, plus different line styles and marker shapes so you can tell them apart even without color.

Don't: Legend-only, identical line styles
Line chart with four colored lines and a small legend at the bottom, requiring users to constantly cross-reference colors
Do: Direct labels, varied styles
Line chart with four lines using different dash styles, marker shapes, and end-of-line labels showing region name and value

Who this excludes

Users with cognitive disabilities, short-term memory challenges, and attention deficit disorders. Studies show that legend-dependent charts increase cognitive load by 40-60% compared to directly labeled charts. It also impacts all users on mobile where chart and legend are far apart on a small screen.

How to fix it

Put labels where the data is:

  • Place series names directly at the end of each line (or inline near peaks)
  • Use different line styles (solid, dashed, dotted) so users do not need color to distinguish lines
  • Use different marker shapes (circle, square, triangle, diamond)
  • For bar charts, label bars directly or use a stacked layout with clear annotations
  • For pie charts, label each slice with name and percentage
  • Reserve legends as a supplementary reference, not the primary identifier
7

Overcrowded Charts

WCAG 1.3.1 Info and Relationships · Perceivability Principle

There is a temptation to pack as much data as possible into a single chart. Twelve series on one line chart, fifty data points with overlapping labels, twenty slices in a pie chart. The result is visual noise that no one can parse, and for screen reader users, it becomes a wall of announcements that is functionally useless.

Why AI makes this mistake: Tell AI to "chart this data" and it will dump every series into one visualization. The model optimizes for literal compliance with the request, not for human comprehension. It has no concept of perceptual load or cognitive overload. It just converts data to visuals. You have to tell it explicitly to filter, summarize, or split the data.

The chart on the left has 12 series jammed into one view. The chart on the right shows the top 3 sources clearly, with a subtitle noting that the remaining 9 sources account for 38% of traffic. Same data story, dramatically better comprehension.

Don't: 12 series, visual spaghetti
Line chart with 12 overlapping data series that are nearly impossible to distinguish, with a crowded legend at the bottom
Do: Top 3 sources, clear story
Column chart showing only the top 3 traffic sources with clear labels and a subtitle noting 9 other sources make up 38% of total

Who this excludes

Screen readers that must announce every element in a verbose, unparseable stream. Users with cognitive disabilities who become overwhelmed. Users with low vision who cannot read small, cramped labels. Mobile users where the chart is already space-constrained. Fundamentally, it hurts everyone.

How to fix it

Simplify ruthlessly:

  • Limit to 3-5 series per chart. If you have 12 categories, split them across multiple focused charts
  • Use "Top N + Other" grouping to reduce visual clutter while preserving the full picture
  • Provide interactive toggles so users can show/hide specific series
  • Increase font sizes (14px minimum for labels) and line widths (2-4px)
  • For dashboards, limit to 4-6 charts per view with clear section headings
  • Remember: two clear charts always beat one confusing chart
8

Missing Axis Labels and Units

WCAG 1.3.1 Info and Relationships · Level A

A chart titled "Data" with bars labeled A through E and a Y-axis showing numbers without units is meaningless. Are those dollars? Thousands of users? Percentage points? Metric tons? Without axis labels and units, the viewer is left to guess, and a guess is not data communication.

Why AI makes this mistake: AI generates functional axes but skips descriptive labels and units. The model sees columns, rows, and values; the semantic meaning (dollars, kilograms, percentages) is not encoded in the data structure, so AI does not add it. A chart with "Q1, Q2, Q3" and "100, 200, 300" becomes a chart with those exact labels, nothing more.

This mistake is especially harmful for screen reader users, who only get the text content. If the axis label says nothing, the screen reader says nothing useful either.

Don't: "Data" with mystery values
Bar chart with vague title 'Data', single-letter category labels A through E, and no axis labels or units on the Y axis
Do: Descriptive title, clear units
Bar chart titled 'Annual Revenue by Product Line' with labeled categories, Y-axis showing 'Revenue (USD)', and dollar values on each bar

Who this excludes

Everyone. Without units and labels, the chart is ambiguous for all users. But the impact is most severe for screen reader users who cannot visually infer context from surrounding page content, and for users with cognitive disabilities who need explicit, clear labeling to understand data.

How to fix it

Label everything that needs context:

  • Chart title should describe the data and time period: "Annual Revenue by Product Line, FY 2025"
  • Y-axis label must include units: "Revenue (USD)", "Temperature (°C)", "Users (thousands)"
  • X-axis label should provide context: "Product Line", "Month (Jan-Dec 2025)"
  • Include a subtitle with the data source if relevant
  • Add data labels on bars/points for precise values
  • Start Y-axis at zero unless there is a compelling reason not to (and if so, clearly mark the truncation)
9

Visual-Only Trends

WCAG 1.1.1 Non-text Content · Level A

A line sloping upward. A cluster of dots in the top-right corner. A seasonal wave pattern. These visual trends are obvious to sighted users, but they are invisible to screen reader users and inaccessible to anyone who cannot perceive visual patterns.

Why AI makes this mistake: AI never generates a textual summary alongside the chart. It generates the visual artifact. The insight layer (the story, the trend, the anomaly) is not part of the output. AI would need to analyze the data, extract meaning, and articulate it in language. That is a separate task that requires explicit prompting or post-generation editing.

The fix is simple: describe the trend in text. A one-sentence summary below the chart that says "Revenue grew 75% from Q1 to Q4, with the steepest increase between Q2 and Q3" makes the insight available to everyone. This also benefits sighted users who might miss subtle patterns or misinterpret the data.

Who this excludes

Blind and low-vision users who cannot see slope, direction, or clustering. Users with visual agnosia who struggle to interpret spatial relationships. Users on small mobile screens where trends may not be visually apparent. It also creates ambiguity for sighted users who may interpret the trend differently than intended.

How to fix it

Always pair your chart with a textual summary of its key insights:

  • State the overall trend: up, down, stable, cyclical
  • Mention the magnitude: "grew 75%", "declined by $300K", "fluctuated between 40 and 60"
  • Call out key inflection points: peaks, valleys, anomalies, turning points
  • Use <figcaption> or an aria-describedby linked paragraph
  • For screen readers, wrap the summary in a <div role="region" aria-label="Chart summary">
<figure>
  <img src="sales-chart.png"
       alt="Line chart showing quarterly sales growth in 2025"
       aria-describedby="chart-summary">
  <div id="chart-summary" role="region" aria-label="Chart summary">
    <p>Revenue grew 75% from $1.2M (Q1) to $2.1M (Q4). Growth was
    consistent across quarters, with the largest single-quarter
    increase of $300K between Q2 and Q3.</p>
  </div>
</figure>
10

Animation Without Reduced-Motion Support

WCAG 2.3.3 Animation from Interactions · Level AAA

Bars that slide in from the bottom, pie slices that spin into place, data points that bounce onto the screen. Chart animations feel polished, but for roughly 15% of the population who have some sensitivity to motion, they cause real physical symptoms: dizziness, nausea, migraines, and in extreme cases, seizures.

Why AI makes this mistake: AI-generated chart code often includes animation by default with no reduced-motion check. Most charting library examples show animated renders. The model sees animation in the training data and includes it without thinking about accessibility. The prefers-reduced-motion media query is invisible to most AI training corpora because it is a newer, less common pattern.

The prefers-reduced-motion media query has been supported in all major browsers since 2019. There is no excuse for ignoring it.

Who this excludes

Approximately 15% of the population with motion sensitivity. This includes people with vestibular disorders (dizziness, balance problems), migraine sufferers, people with photosensitive epilepsy, and users with attention deficits who are overwhelmed by movement. Chart animations are purely decorative. They add zero informational value.

How to fix it

Respect the user's motion preferences:

  • Check prefers-reduced-motion: reduce and disable all animations when set
  • Make instant rendering the default; animations should be an enhancement, not a requirement
  • Keep animations under 3 seconds if used at all
  • Never flash content more than 3 times per second (this is a safety issue, not just comfort)
  • Provide manual play/pause controls for any auto-playing visualizations
/* CSS: Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .chart-element,
  .chart-element * {
    animation: none !important;
    transition: none !important;
  }
}

/* JavaScript: Check before animating */
const prefersReducedMotion = window.matchMedia(
  "(prefers-reduced-motion: reduce)"
).matches;

const chartOptions = {
  plotOptions: {
    series: {
      animation: prefersReducedMotion ? false : { duration: 600 }
    }
  }
};

Quick Reference

The complete list in one table. Bookmark this.

# Error WCAG Level Key Fix
1 Color-only encoding 1.4.1 A Add patterns, shapes, and text labels
2 Low contrast 1.4.11 AA 3:1 minimum for graphics, 4.5:1 for text
3 Missing alt text 1.1.1 A Describe the insight, not just the chart type
4 No keyboard navigation 2.1.1 A Tab, arrow keys, Enter, Escape, visible focus
5 No data table 1.3.1 A Provide collapsible HTML table or CSV download
6 Legend-only labels 3.3.5 AAA Direct labels on data elements
7 Overcrowded charts 1.3.1 A Max 3-5 series, split into multiple charts
8 Missing axis labels 1.3.1 A Descriptive labels with units on all axes
9 Visual-only trends 1.1.1 A Add a textual summary of key insights
10 No reduced-motion 2.3.3 AAA Respect prefers-reduced-motion

The Bottom Line

Vibe coding is not going away. The speed advantage is real, and the developer experience is compelling. But the speed advantage is worthless if 15% of your users cannot use the output.

Seven of these ten errors violate WCAG Level A or AA requirements. These are not aspirational best practices; they are the legal baseline in the EU under the European Accessibility Act (effective June 2025) and in the US under ADA and Section 508 interpretations.

The good news is that none of these fixes are difficult. Most of them take less time than designing the chart in the first place. Use distinct colors and add text labels. Bump your contrast ratios. Write alt text that describes the insight. Provide a data table. Label your axes. Describe your trends in words. Check a single media query before animating.

When you are generating charts with AI, audit the output against these ten errors. Add a checklist to your code review. If you are prompting the AI, add accessibility requirements to your prompts. "Generate a chart..." should become "Generate an accessible chart with distinct colors, direct labels, a data table, and alt text describing the trend."

Accessible charts are not just compliance checkboxes. They are better charts, period. A chart that works for a colorblind user also works better for the person projecting it on a washed-out conference room screen. A chart with direct labels is faster to read for everyone. A chart with a textual summary is more persuasive in an email where the image might not load.

Build for the widest audience, and the quality follows.