For testing, I've added a trivial DOM mutation by asynchronously setting the alt tag on img. Generally, I think this works. Though, there's a weird bug that I can't figure out:
Refresh the page
All nodes are in violation
img gets a valid alt attribute after 3 seconds, thus it is no longer in violation
The overlays of input elements disappear
If I resize the window, the input overlays reappear.
I think the problem is with observing the position of the overlay:
Closes #8
For testing, I've added a trivial DOM mutation by asynchronously setting the
alt
tag onimg
. Generally, I think this works. Though, there's a weird bug that I can't figure out:img
gets a validalt
attribute after 3 seconds, thus it is no longer in violationinput
elements disappearIf I resize the window, the
input
overlays reappear.I think the problem is with observing the position of the overlay:
https://github.com/raunofreiberg/axe-mode/blob/57809ed8e5e1455653046e1f4cd350fbc4543b60/src/index.tsx#L88-L90
If I add this, the overlays persists its position:
@chancestrickland maybe you can shine some light here. I might be doing something wrong! 😄