You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: aria_role.rs
    path of file: ./repos/oxc/crates/oxc_linter/src/rules/jsx_a11y
    
    the code of the file until where you have to start completion: use oxc_ast::{
    ast::{JSXAttributeValue, JSXExpression, JSXExpressionContainer},
    AstKind,
};
use oxc_diagnostics::{
    miette::{self, Diagnostic},
    thiserror::Error,
};
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;

use crate::{
    context::LintContext,
    globals::{HTML_TAG, VALID_ARIA_ROLES},
    rule::Rule,
    utils::{get_element_type, get_prop_value, has_jsx_prop},
    AstNode,
};

#[derive(Debug, Error, Diagnostic)]
#[error("eslint-plugin-jsx-a11y(aria-role): Elements with ARIA roles must use a valid, non-abstract ARIA role.")]
#[diagnostic(
    severity(warning),
    help("Set a valid, non-abstract ARIA role for element with ARIA{1}")
)]
struct AriaRoleDiagnostic(#[label] pub Span, String);

#[derive(Debug, Default, Clone)]
pub struct AriaRole(Box<AriaRoleConfig>);

#[derive(Debug, Default, Clone)]
pub struct AriaRoleConfig {
    ignore_non_dom: bool,
    allowed_invalid_roles: Vec<String>,
}

impl std::ops::Deref for AriaRole {
    type Target = AriaRoleConfig;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

declare_oxc_lint!(
    /// ### What it does
    /// Elements with ARIA roles must use a valid, non-abstract ARIA role. A reference to role definitions can be found at [WAI-ARIA](https://www.w3.org/TR/wai-aria/#role_definitions) site.

    ///
    /// ### Why is this bad?
    /// The intent of this Success Criterion is to ensure that Assistive Technologies (AT) can gather information about,
    /// activate (or set) and keep up to date on the sta
    
fn test() {
    use crate::tester::Tester;

    fn ignore_non_dom_schema() -> serde_json::Value {
        serde_json::json!([2,{
            "ignoreNonDOM": true
        }])
    }

    fn allowed_invalid_roles() -> serde_json::Value {
        serde_json::json!([2,{
            "allowedInvalidRoles": ["invalid-role", "other-invalid-role"],
        }])
    }

    fn settings() -> serde_json::Value {
        serde_json::json!({
            "jsx-a11y": {
                "polymorphicPropName": "asChild",
                "components": {
                    "Div": "div",
                }
            }
        })
    }

    let pass = vec![
        ("<div />", None, None, None),
        ("<div></div>", None, None, None),
        ("<div role={role} />", None, None, None),
        ("<div role={role || 'button'} />", None, None, None),
        ("<div role={role || 'foobar'} />", None, None, None),
        ("<div role='tabpanel row' />", None, None, None),
        ("<div role='switch' />", None, None, None),
        ("<div role='doc-abstract' />", None, None, None),
        ("<div role='doc-appendix doc-bibliography' />", None, None, None),
        ("<Bar baz />", None, None, None),
        ("<img role='invalid-role' />", Some(allowed_invalid_roles()), None, None),
        ("<img role='invalid-role tabpanel' />", Some(allowed_invalid_roles()), None, None),
        (
            "<img role='invalid-role other-invalid-role' />",
            Some(allowed_invalid_roles()),
            None,
            None,
        ),
        ("<Foo role='bar' />", Some(ignore_non_dom_schema()), None, None),
        ("<fakeDOM role='bar' />", Some(ignore_non_dom_schema()), None, None),
        ("<img role='presentation' />", Some(ignore_non_dom_schema()), None, None),
        ("<Div role='button' />", None, Some(settings()), None),
        ("<Box asChild='div' role='button' />", None, Some(settings()), None),
        ("<svg role='graphics-document document' />", None, None, None),
    ];

    let fail = vec![
        ("<div role='foobar' />", None, None, None),
        ("<div role='datepicker'></div>", None, None, None),
        ("<div role='range'></div>", None, None, None),
        ("<div role='Button'></div>", None, None, None),
        ("<div role='></div>", None, None, None),
        ("<div role='tabpanel row foobar'></div>", None, None, None),
        ("<div role='tabpanel row range'></div>", None, None, None),
        ("<div role='doc-endnotes range'></div>", None, None, None),
        ("<div role />", None, None, None),
        ("<div role='unknown-invalid-role' />", Some(allowed_invalid_roles()), None, None),
        ("<div role={null}></div>", None, None, None),
        ("<Foo role='datepicker' />", None, None, None),
        ("<Foo role='Button' />", None, None, None),
        ("<Div role='Button' />", None, Some(settings()), None),
        ("<Div role='Button' />", Some(ignore_non_dom_schema()), Some(settings()), None),
        ("<Box asChild='div' role='Button' />", None, None, None),
    ];

    Tester::new(AriaRole::NAME, pass, fail).test_and_snapshot();
}