@@ -1260,8 +1260,9 @@ describe("5 tabstop", () => {
12601260 table . cell ( { row : 1 , col : 1 } ) . should ( "have.attr" , "tabindex" , "0" ) ;
12611261 } ) ;
12621262
1263- it ( "should set correct tabstop for all types of headers and cells on navigation" , ( ) => {
1264- const { buttonBeforeTable } = mountNavigationTestbed ( ) ;
1263+ it ( "should set correct tabstop for all types of headers, cells and footer on navigation" , ( ) => {
1264+ const slots = { footer : "footer" } ;
1265+ const { buttonBeforeTable } = mountNavigationTestbed ( slots ) ;
12651266 cy . get ( buttonBeforeTable ) . focus ( ) ;
12661267 cy . focused ( ) . press ( Cypress . Keyboard . Keys . TAB ) ;
12671268 // {1, 1}: expand button
@@ -1381,10 +1382,23 @@ describe("5 tabstop", () => {
13811382 . should ( "have.prop" , "tagName" , "TD" )
13821383 . should ( "not.have.text" )
13831384 . should ( "have.attr" , "tabindex" , 0 ) ;
1385+ cy . focused ( ) . press ( Cypress . Keyboard . Keys . DOWN ) ;
1386+ // {3, 1}: expand footer
1387+ cy . focused ( )
1388+ . should ( "have.prop" , "tagName" , "TD" )
1389+ . should ( "have.text" , "footer" )
1390+ . should ( "have.attr" , "tabindex" , 0 ) ;
1391+ cy . focused ( ) . press ( Cypress . Keyboard . Keys . UP ) ;
1392+ // {2, 1}: expand for child (empty)
1393+ cy . focused ( )
1394+ . should ( "have.prop" , "tagName" , "TD" )
1395+ . should ( "not.have.text" )
1396+ . should ( "have.attr" , "tabindex" , 0 ) ;
13841397 } ) ;
13851398
1386- it ( "should set correct tabstop for all types of headers and cells on click" , ( ) => {
1387- mountNavigationTestbed ( ) ;
1399+ it ( "should set correct tabstop for all types of headers, cells and footer on click" , ( ) => {
1400+ const slots = { footer : "footer" } ;
1401+ mountNavigationTestbed ( slots ) ;
13881402
13891403 // {1, 1}: expand button
13901404 table . cell ( { row : 1 , col : 1 } ) . click ( ) ;
@@ -1493,6 +1507,12 @@ describe("5 tabstop", () => {
14931507 . should ( "have.prop" , "tagName" , "TD" )
14941508 . should ( "not.have.text" )
14951509 . should ( "have.attr" , "tabindex" , 0 ) ;
1510+ // {3, 1}: expand footer
1511+ table . footer ( ) . click ( ) ;
1512+ cy . focused ( )
1513+ . should ( "have.prop" , "tagName" , "TD" )
1514+ . should ( "have.text" , "footer" )
1515+ . should ( "have.attr" , "tabindex" , 0 ) ;
14961516 } ) ;
14971517
14981518 it ( "should allow tab navigation in and out of expanded row" , ( ) => {
@@ -1526,23 +1546,6 @@ describe("5 tabstop", () => {
15261546 cy . focused ( ) . press ( Cypress . Keyboard . Keys . TAB ) ;
15271547 table . cell ( { row : 2 , col : 2 } ) . should ( "have.focus" ) ;
15281548 } ) ;
1529-
1530- it ( "should not change footer tabindex" , ( ) => {
1531- const footerButtonSelector = "footerButton" ;
1532- const slots = {
1533- footer : renderButton ( "Footer button" , {
1534- dataTest : footerButtonSelector ,
1535- } ) ,
1536- } ;
1537- mountNavigationTestbed ( slots ) ;
1538- const footerButton = getTestSelector ( footerButtonSelector ) ;
1539-
1540- table . cell ( { row : 1 , col : 3 } ) . click ( ) ;
1541- cy . focused ( ) . press ( Cypress . Keyboard . Keys . TAB ) ;
1542- cy . get ( footerButton ) . should ( "have.focus" ) ;
1543- cy . focused ( ) . realPress ( [ "Shift" , "Tab" ] ) ;
1544- table . cell ( { row : 1 , col : 3 } ) . should ( "have.focus" ) ;
1545- } ) ;
15461549} ) ;
15471550
15481551describe ( "Radio button single‑select functionality in table" , ( ) => {
0 commit comments