File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,12 @@ export function isAccessibility(selector) {
6060 isA11y = true
6161 return this . break
6262 }
63- } else if ( node . type == 'PseudoClassSelector' ) {
63+ }
64+ // Test for [aria-] or [role] inside :is()/:where() and friends
65+ else if ( node . type == 'PseudoClassSelector' ) {
6466 if ( isPseudoFunction ( node . name ) ) {
6567 const list = analyzeList ( node , isAccessibility )
6668
67- // Bail out for empty/non-existent :nth-child() params
68- if ( list . length === 0 ) return
69-
7069 if ( list . some ( b => b == true ) ) {
7170 isA11y = true
7271 return this . skip
@@ -116,12 +115,12 @@ export function getComplexity(selector) {
116115
117116 if ( node . type == 'PseudoClassSelector' ) {
118117 if ( isPseudoFunction ( node . name ) ) {
119- const selectorList = analyzeList ( node , getComplexity )
118+ const list = analyzeList ( node , getComplexity )
120119
121120 // Bail out for empty/non-existent :nth-child() params
122- if ( selectorList . length === 0 ) return
121+ if ( list . length === 0 ) return
123122
124- selectorList . forEach ( c => complexity += c )
123+ list . forEach ( c => complexity += c )
125124 return this . skip
126125 }
127126 }
You can’t perform that action at this time.
0 commit comments