@@ -168,7 +168,13 @@ const cases = [
168168 [ "title" , null , createElementFactory ( "title" , { } ) ] ,
169169 // WARNING: Only in certain contexts
170170 [ "td" , "cell" , createElementFactory ( "td" , { } ) ] ,
171- [ "th" , "columnheader" , createElementFactory ( "th" , { } ) ] ,
171+ // default scope=auto
172+ [ "th missing scope" , "columnheader" , createElementFactory ( "th" , { } ) ] ,
173+ [ "th scope explicitly set to `auto`" , "columnheader" , createElementFactory ( "th" , { scope :"auto" } ) ] ,
174+ [ "th scope=col" , "columnheader" , createElementFactory ( "th" , { scope :"col" } ) ] ,
175+ [ "th scope=colgroup" , "columnheader" , createElementFactory ( "th" , { scope :"colgroup" } ) ] ,
176+ [ "th scope=row" , "rowheader" , createElementFactory ( "th" , { scope :"row" } ) ] ,
177+ [ "th scope=rowgroup" , "rowheader" , createElementFactory ( "th" , { scope :"rowgroup" } ) ] ,
172178 [ "tr" , "row" , createElementFactory ( "tr" , { } ) ] ,
173179 [ "track" , null , createElementFactory ( "track" , { } ) ] ,
174180 [ "ul" , "list" , createElementFactory ( "ul" , { } ) ] ,
@@ -182,7 +188,7 @@ const cases = [
182188 [ "presentational <div /> with prohibited aria attributes" , null , createElementFactory ( "div" , { 'aria-label' : "hello" , role : "none" } ) ] ,
183189] ;
184190
185- it . each ( cases ) ( "%s has the role %s" , ( name , role , elementFactory ) => {
191+ it . each ( cases ) ( "%s has the role %s" , ( _name , role , elementFactory ) => {
186192 const element = elementFactory ( ) ;
187193
188194 expect ( getRole ( element ) ) . toEqual ( role ) ;
0 commit comments