Skip to content

Failed example not working for rule "No keyboard trap standard navigation" #494

@audreymaniez

Description

@audreymaniez

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>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions