src/content/docs/linter/rules/no-redundant-alt.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JSX and TSX" icon="seti:javascript"> ## Summary - Rule available since: `v1.0.0` - Diagnostic Category: [`lint/a11y/noRedundantAlt`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`jsx-a11y/img-redundant-alt`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/img-redundant-alt.md){
"linter": {
"rules": {
"a11y": {
"noRedundantAlt": "error"
}
}
}
}
Enforce img alt prop does not contain the word "image", "picture", or "photo".
The rule will first check if aria-hidden is truthy to determine whether to enforce the rule. If the image is
hidden, then the rule will always succeed.
;
;
;
<>
</>
{
"linter": {
"rules": {
"a11y": {
"noRedundantAlt": "error"
}
}
}
}
Enforce img alt prop does not contain the word "image", "picture", or "photo".
The rule will first check if aria-hidden is truthy to determine whether to enforce the rule. If the image is
hidden, then the rule will always succeed.
;
;
<div>
</div>