Vize

a11y/iframe-has-title

Require iframe elements to have a title attribute.

Default severity Presets Automatic fix Options
warning happy-path, nuxt, ecosystem, opinionated No None

Applies to: Vue SFC templates and blocks, with script context where the rule requires it.

Bad

The checkout frame has a source URL but no title describing the embedded content.

<template>
  <iframe src="/checkout"></iframe>
</template>

Good

title="Checkout preview" names the content of that frame.

<template>
  <iframe src="/checkout" title="Checkout preview"></iframe>
</template>

Configuration (Vite+)

import { defineConfig } from "@vizejs/vite-plugin/vite-plus";

export default defineConfig({}).withVue({
  linter: {
    "preset": "incremental",
    "rules": {
      "a11y/iframe-has-title": "warn"
    }
  },
});

Then run vp run lint.