{"record":{"id":"31e443cc8ae94d75","repo":"oxc-project/oxc","slug":"elements-with-aria-activedescendant-must-be-tabb","errorCode":null,"errorMessage":"Elements with `aria-activedescendant` must be tabbable.","messagePattern":"Elements with `aria-activedescendant` must be tabbable\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/jsx_a11y/aria_activedescendant_has_tabindex.rs","lineNumber":18,"sourceCode":"use oxc_ast::{\n    AstKind,\n    ast::{JSXAttribute, JSXAttributeItem, JSXElementName},\n};\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{\n    AstNode,\n    context::LintContext,\n    globals::HTML_TAG,\n    rule::Rule,\n    utils::{get_element_type, has_jsx_prop_ignore_case, is_interactive_element, parse_jsx_value},\n};\n\nfn aria_activedescendant_has_tabindex_diagnostic(span: Span, el_name: &str) -> OxcDiagnostic {\n    OxcDiagnostic::warn(\"Elements with `aria-activedescendant` must be tabbable.\")\n        .with_help(format!(\"Add a `tabindex` attribute to this {el_name}.\"))\n        .with_label(span)\n}\n\n#[derive(Debug, Default, Clone)]\npub struct AriaActivedescendantHasTabindex;\n\ndeclare_oxc_lint!(\n    /// ### What it does\n    ///\n    /// Enforce elements with aria-activedescendant are tabbable.\n    ///\n    /// ### Why is this bad?\n    ///\n    /// Elements with `aria-activedescendant` must be tabbable for users to\n    /// navigate to them using keyboard input. Without proper tabindex, screen\n    /// reader users cannot access the element through keyboard navigation,\n    /// making the functionality inaccessible.","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/jsx_a11y/aria_activedescendant_has_tabindex.rs#L1-L36","documentation":"Fires from jsx-a11y/aria-activedescendant-has-tabindex when an element sets aria-activedescendant (which delegates focus to a descendant) but is not itself tabbable. The run visitor checks such elements and the helper advises adding a tabindex (typically 0) to the named element.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/jsx_a11y/aria_activedescendant_has_tabindex.rs:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add `tabIndex=\"0\"` (or an appropriate non-negative value) to the element","Remove `aria-activedescendant` if the element is not managing focus"],"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"}