src/content/docs/linter/rules/use-valid-aria-values.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/useValidAriaValues`](/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/aria-proptypes`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/aria-proptypes.md){
"linter": {
"rules": {
"a11y": {
"useValidAriaValues": "error"
}
}
}
}
Enforce that ARIA state and property values are valid.
<span role="checkbox" aria-checked="test">some text</span>
<span aria-labelledby="">some text</span>
<span aria-valuemax="hey">some text</span>
<span aria-orientation="hey">some text</span>
<>
<span role="checkbox" aria-checked={checked} >some text</span>
<span aria-labelledby="fooId barId" >some text</span>
</>