@use "../../shared/messages" as *;

/* W0002: HTMLElements other than <a> and <button> that have mouse event handlers without the appropriate keyboard handlers are not accessible */

[onclick]:not(a, button, [onkeydown], [onkeyup], [onkeypress])::after,
[onclick][onkeyup]:not([tabindex], a, button)::after,
[onclick][onkeyup][tabindex="-1"]:not(a, button)::after,
[onclick][onkeydown]:not([tabindex], a, button)::after,
[onclick][onkeydown][tabindex="-1"]:not(a, button)::after,
[onclick][onkeypress]:not([tabindex], a, button)::after,
[onclick][onkeypress][tabindex="-1"]:not(a, button)::after,
[ondblclick]:not(a, button, [onkeydown], [onkeyup], [onkeypress])::after,
[ondblclick][onkeyup]:not([tabindex], a, button)::after,
[ondblclick][onkeyup][tabindex="-1"]:not(a, button)::after,
[ondblclick][onkeydown]:not([tabindex], a, button)::after,
[ondblclick][onkeydown][tabindex="-1"]:not(a, button)::after,
[ondblclick][onkeypress]:not([tabindex], a, button)::after,
[ondblclick][onkeypress][tabindex="-1"]:not(a, button)::after,
[onmousedown]:not(a, button, [onkeydown], [onkeyup], [onkeypress])::after,
[onmousedown][onkeyup]:not([tabindex], a, button)::after,
[onmousedown][onkeyup][tabindex="-1"]:not(a, button)::after,
[onmousedown][onkeydown]:not([tabindex], a, button)::after,
[onmousedown][onkeydown][tabindex="-1"]:not(a, button)::after,
[onmousedown][onkeypress]:not([tabindex], a, button)::after,
[onmousedown][onkeypress][tabindex="-1"]:not(a, button)::after,
[onmouseup]:not(a, button, [onkeydown], [onkeyup], [onkeypress])::after,
[onmouseup][onkeyup]:not([tabindex], a, button)::after,
[onmouseup][onkeyup][tabindex="-1"]:not(a, button)::after,
[onmouseup][onkeydown]:not([tabindex], a, button)::after,
[onmouseup][onkeydown][tabindex="-1"]:not(a, button)::after,
[onmouseup][onkeypress]:not([tabindex], a, button)::after,
[onmouseup][onkeypress][tabindex="-1"]:not(a, button)::after,
[onmouseover]:not(a, button)::after,
[onmouseenter]:not(a, button)::after,
[onmouseleave]:not(a, button)::after {
  @include contentMessage(warning, "W0002", "Potentially inaccessible click event used on non-clickable element. Ensure you have an accessible alternative.");
}
