dequelabs / axe-core-maven-html

Tools for using axe for web accessibility testing with JUnit, Selenium, and Playwright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support axe core shadow dom selector

michael-siek opened this issue · comments

Ref: dequelabs/axe-core#3798

With axe core having the ability to select shadow dom in the 4.6 release the axe core npm drivers that support the include/exclude methods should also support this. We would need to make sure to also update the selector types within each method to the new types provided by axe-core

import type { Selector, SelectorList } from 'axe-core';

class AxeBuilder {

 constructor() { }
 
 public async include(selector: Selector | SelectorList) { }
 
 public async exclude(selector: Selector | SelectorList) { }
  
}

We can now use SerialFrameSelector for the include / exclude selector type.

Verified above changes in latest develop branch for both Selenium and Playwright. Its working fine.