{"record":{"id":"507025518a9efbe0","repo":"oxc-project/oxc","slug":"this-is-not-a-valid-aria-state-and-property-value","errorCode":null,"errorMessage":"This is not a valid ARIA state and property value for '{prop_name}'.","messagePattern":"This is not a valid ARIA state and property value for '(.+?)'\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsx_a11y/aria_proptypes.rs","lineNumber":28,"sourceCode":"use oxc_span::Span;\nuse oxc_str::CompactStr;\nuse oxc_syntax::operator::UnaryOperator;\n\nuse crate::{\n    AstNode,\n    context::LintContext,\n    globals::AriaProperty,\n    rule::Rule,\n    utils::{get_jsx_attribute_name, starts_with_ignore_case},\n};\n\nfn aria_proptypes_diagnostic(\n    span: Span,\n    prop_name: &str,\n    prop_type: &AriaPropType,\n) -> OxcDiagnostic {\n    let valid_prop_message = generate_valid_prop_message(prop_type);\n    OxcDiagnostic::warn(format!(\"This is not a valid ARIA state and property value for '{prop_name}'.\"))\n    .with_help(format!(\n        \"The valid value for '{prop_name}' is: {valid_prop_message}.\\nYou can find a list of valid ARIA state and property values at https://www.w3.org/TR/wai-aria/#x6-7-definitions-of-states-and-properties-all-aria-attributes\"\n    ))\n    .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct AriaProptypes;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Enforces that elements do not use invalid ARIA state and property values.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// Using invalid ARIA state and property values can mislead screen readers and other assistive technologies.\n    /// It may cause the accessibility features of the website to fail, making it difficult for users with disabilities to use the site effectively.","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsx_a11y/aria_proptypes.rs#L10-L46","documentation":"Fires from jsx-a11y/aria-proptypes when an ARIA attribute's value does not match the type required by the ARIA spec for that property (e.g. a non-boolean given to aria-hidden, or an out-of-range integer for aria-level). The helper interpolates the property name and builds help text listing the valid values for the detected type.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsx_a11y/aria_proptypes.rs:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the attribute to a valid value for its ARIA property type (per the help text listing valid values)","Use the correct value kind: boolean, integer, ID reference, token, or string as required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}