dequelabs / dequelabs/axe-core

Call after methods in axe.runVirtualRule

Open
#4,037 0 comments 0 reactions 0 assignees View on GitHub
core fix
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 13h
Merged PRs (30d)
29

Description

Because `axe.runVirtualRule` isn't calling `after` methods, it can't give correct results for rules that use them. I'm not aware of anyone who's using runVirtualRule using it to run rules with an after method. It would've been reported otherwise, but someone might.

This should result in a violation:

```js
var node = new axe.SerialVirtualNode({ nodeName: 'div'});
node.children = [
new axe.SerialVirtualNode({ nodeName: 'main'}),
new axe.SerialVirtualNode({ nodeName: 'main'})
];
var results = axe.runVirtualRule('landmark-no-duplicate-main', node);
```

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied reproduction using axe.SerialVirtualNode and axe.runVirtualRule for landmark-no-duplicate-main. Read the runVirtualRule entry point and trace how rules' after methods are handled. Done means the example reports a violation and regression coverage verifies after-method behavior; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
47/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.