-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Labels
Description
I think there's a mistake in the failed example 2 of the atomic rule "No keyboard trap standard navigation"
The example can be played here : https://act-rules.github.io/testcases/a1b64e/53533fed576efe68df05104c8fa421067730ce2c.html
There is no trapping focus (in FF) and the console shows errors about the function this.nextSibling.focus()
and this.previousSebling.focus
, arguing this are not function.
I think we should change nextSibling
and previousSibling
for nextElementSibling
and previousElementSibling
(but I let javascript's heroes here confirm ;) )
And I suggest adding a third buttons outside of the group of the two button, otherwise the trapping focus is not obvious for testers.
<button class="target" onblur="setTimeout(() => this.nextElementSibling.focus(), 10)">
Button1
</button>
<button class="target" onblur="setTimeout(() => this.previousElementSibling.focus(), 10)">
Button2
</button>
<button>
Button3 (will never receive focus)
</button>