diff --git a/crates/oxc_linter/src/rules/jsx_a11y/no_redundant_roles.rs b/crates/oxc_linter/src/rules/jsx_a11y/no_redundant_roles.rs
index 2f8e3b72c611e..7fca7523bd66e 100644
--- a/crates/oxc_linter/src/rules/jsx_a11y/no_redundant_roles.rs
+++ b/crates/oxc_linter/src/rules/jsx_a11y/no_redundant_roles.rs
@@ -27,8 +27,9 @@ pub struct NoRedundantRoles;
declare_oxc_lint!(
/// ### What it does
///
- /// Enforces that the explicit `role` property is not the same as
- /// implicit/default role property on element.
+ /// Enforces that code does not include a redundant `role` property, in the
+ /// case that it's identical to the implicit `role` property of the
+ /// element type.
///
/// ### Why is this bad?
///
@@ -36,14 +37,24 @@ declare_oxc_lint!(
///
/// ### Examples
///
+ /// This rule applies for the following elements and their implicit roles:
+ ///
+ /// - `", None, None),
+ ("", None, None),
("", None, Some(settings())),
];
let fix = vec![
("", ""),
+ ("Foo", "Foo"),
+ ("", ""),
+ ("", ""),
+ (
+ "
+ Foo
+ ",
+ "
+ Foo
+ ",
+ ),
+ ("", ""),
("
Foobarbaz!! document body role
",
+ "
Foobarbaz!! document body role
",
+ ),
];
Tester::new(NoRedundantRoles::NAME, NoRedundantRoles::PLUGIN, pass, fail)
diff --git a/crates/oxc_linter/src/snapshots/jsx_a11y_no_redundant_roles.snap b/crates/oxc_linter/src/snapshots/jsx_a11y_no_redundant_roles.snap
index c537174cf7539..060939e9af0b9 100644
--- a/crates/oxc_linter/src/snapshots/jsx_a11y_no_redundant_roles.snap
+++ b/crates/oxc_linter/src/snapshots/jsx_a11y_no_redundant_roles.snap
@@ -9,6 +9,55 @@ source: crates/oxc_linter/src/tester.rs
╰────
help: Remove the redundant role `button` from the element `button`.
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:25]
+ 1 │
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │ Foo
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │
Test
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
+ ⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `button` element has an implicit role of `button`. Defining this explicitly is redundant and should be avoided.
+ ╭─[no_redundant_roles.tsx:1:9]
+ 1 │
+ · ─────────────
+ ╰────
+ help: Remove the redundant role `button` from the element `button`.
+
⚠ eslint-plugin-jsx-a11y(no-redundant-roles): The `body` element has an implicit role of `document`. Defining this explicitly is redundant and should be avoided.
╭─[no_redundant_roles.tsx:1:7]
1 │