chore(site): enable iframe-has-title oxlint rule (#32741)
> 🤖 This PR was written by Codex on behalf of Jake Howell. Moves [iframe-has-title](https://oxc.rs/docs/guide/usage/linter/rules/jsx_a11y/iframe-has-title.html) out of the Oxlint migration backlog and sets it to `error`. Disables Biome’s equivalent for `site/`. Both callers already supply titles. The shared workspace iframe now requires the title prop and passes it explicitly to the native iframe. Related to #31148 and #32740.
This commit is contained in:
1 parent
f2b60844c5
commit
a5367f6a2e
3 files changed
+13
-2
No files matched your search
@@ -33,6 +33,7 @@
|
||||
"media-has-caption": "error",
|
||||
"click-events-have-key-events": "error",
|
||||
"no-noninteractive-tabindex": "error",
|
||||
"iframe-has-title": "error",
|
||||
|
||||
// --- complexity ---
|
||||
"no-regex-spaces": "error",
|
||||
@@ -226,7 +227,6 @@
|
||||
// ==========================================================
|
||||
"no-autofocus": "off", // a11y/noAutofocus (large)
|
||||
"interactive-supports-focus": "off", // a11y/useFocusableInteractive (small)
|
||||
"iframe-has-title": "off", // a11y/useIframeTitle (small)
|
||||
|
||||
// Correctness category rules with existing violations.
|
||||
"require-mock-type-parameters": "off", // (xl)
|
||||
|
||||
@@ -3,5 +3,12 @@
|
||||
"files": {
|
||||
"includes": ["!e2e/**/*Generated.ts", "!scripts/*.mjs", "!src/vendor"]
|
||||
},
|
||||
"linter": {
|
||||
"rules": {
|
||||
"a11y": {
|
||||
"useIframeTitle": "off" // oxlint owns iframe-has-title
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json"
|
||||
}
|
||||
@@ -151,16 +151,20 @@ export const WorkspaceAppFrame: React.FC<WorkspaceAppFrameProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
type WorkspaceIframeProps = React.ComponentProps<"iframe">;
|
||||
type WorkspaceIframeProps = React.ComponentProps<"iframe"> & {
|
||||
title: string;
|
||||
};
|
||||
|
||||
export const WorkspaceIframe: React.FC<WorkspaceIframeProps> = ({
|
||||
className,
|
||||
ref,
|
||||
title,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
<iframe
|
||||
ref={ref}
|
||||
title={title}
|
||||
loading="eager"
|
||||
className={cn("size-full", className)}
|
||||
allow="clipboard-read; clipboard-write"
|
||||
|
||||
Reference in new issue
Block a user