File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,27 @@ describe('getRole', function () {
167167 expect ( getRole ( { } , submit ) ) . to . equal ( 'button' )
168168 } )
169169
170+ it ( 'returns rowheader role for <th scope="row">' , function ( ) {
171+ const node = mockJSXOpeningElement ( 'th' , [ mockJSXAttribute ( 'scope' , 'row' ) ] )
172+ expect ( getRole ( { } , node ) ) . to . equal ( 'rowheader' )
173+ } )
174+
175+ it ( 'returns rowheader role for <th scope="rowgroup">' , function ( ) {
176+ const node = mockJSXOpeningElement ( 'th' , [ mockJSXAttribute ( 'scope' , 'rowgroup' ) ] )
177+ expect ( getRole ( { } , node ) ) . to . equal ( 'rowheader' )
178+ } )
179+
180+ // Hard-coded mapping
181+ it ( 'returns listitem role for <li>' , function ( ) {
182+ const node = mockJSXOpeningElement ( 'li' )
183+ expect ( getRole ( { } , node ) ) . to . equal ( 'listitem' )
184+ } )
185+
186+ it ( 'returns complementary role for <aside>' , function ( ) {
187+ const node = mockJSXOpeningElement ( 'aside' )
188+ expect ( getRole ( { } , node ) ) . to . equal ( 'complementary' )
189+ } )
190+
170191 // <link> does not map to anything.
171192 it ( 'returns undefined role for <link>' , function ( ) {
172193 const node = mockJSXOpeningElement ( 'link' )
You can’t perform that action at this time.
0 commit comments