1- describe ( 'tab-container' , function ( ) {
2- describe ( 'element creation' , function ( ) {
3- it ( 'creates from document.createElement' , function ( ) {
1+ describe ( 'tab-container' , function ( ) {
2+ describe ( 'element creation' , function ( ) {
3+ it ( 'creates from document.createElement' , function ( ) {
44 const el = document . createElement ( 'tab-container' )
55 assert . equal ( 'TAB-CONTAINER' , el . nodeName )
66 } )
77
8- it ( 'creates from constructor' , function ( ) {
8+ it ( 'creates from constructor' , function ( ) {
99 const el = new window . TabContainerElement ( )
1010 assert . equal ( 'TAB-CONTAINER' , el . nodeName )
1111 } )
1212 } )
1313
14- describe ( 'after tree insertion' , function ( ) {
15- beforeEach ( function ( ) {
14+ describe ( 'after tree insertion' , function ( ) {
15+ beforeEach ( function ( ) {
1616 document . body . innerHTML = `
1717 <tab-container>
1818 <div role="tablist">
@@ -33,11 +33,11 @@ describe('tab-container', function() {
3333 `
3434 } )
3535
36- afterEach ( function ( ) {
36+ afterEach ( function ( ) {
3737 document . body . innerHTML = ''
3838 } )
3939
40- it ( 'click works and `tab-container-changed` event is dispatched' , function ( ) {
40+ it ( 'click works and `tab-container-changed` event is dispatched' , function ( ) {
4141 const tabContainer = document . querySelector ( 'tab-container' )
4242 const tabs = document . querySelectorAll ( 'button' )
4343 const panels = document . querySelectorAll ( '[role="tabpanel"]' )
@@ -54,7 +54,7 @@ describe('tab-container', function() {
5454 assert . equal ( document . activeElement , tabs [ 1 ] )
5555 } )
5656
57- it ( 'keyboard shortcuts work and `tab-container-changed` events are dispatched' , function ( ) {
57+ it ( 'keyboard shortcuts work and `tab-container-changed` events are dispatched' , function ( ) {
5858 const tabContainer = document . querySelector ( 'tab-container' )
5959 const tabs = document . querySelectorAll ( 'button' )
6060 const panels = document . querySelectorAll ( '[role="tabpanel"]' )
@@ -73,7 +73,7 @@ describe('tab-container', function() {
7373 assert . equal ( counter , 2 )
7474 } )
7575
76- it ( 'click works and a cancellable `tab-container-change` event is dispatched' , function ( ) {
76+ it ( 'click works and a cancellable `tab-container-change` event is dispatched' , function ( ) {
7777 const tabContainer = document . querySelector ( 'tab-container' )
7878 const tabs = document . querySelectorAll ( 'button' )
7979 const panels = document . querySelectorAll ( '[role="tabpanel"]' )
@@ -94,7 +94,7 @@ describe('tab-container', function() {
9494 assert . equal ( counter , 1 )
9595 } )
9696
97- it ( "panels that don't have a `data-tab-container-no-tabstop` attribute have tabindex with value '0'" , function ( ) {
97+ it ( "panels that don't have a `data-tab-container-no-tabstop` attribute have tabindex with value '0'" , function ( ) {
9898 const tabs = document . querySelectorAll ( 'button' )
9999 const panels = document . querySelectorAll ( '[role="tabpanel"]' )
100100
@@ -105,22 +105,22 @@ describe('tab-container', function() {
105105 assert ( ! panels [ 2 ] . hasAttribute ( 'tabindex' ) )
106106 } )
107107
108- it ( 'the aria-selected attribute is set to "false" for all tabs that don\'t have a aria-selected attribute' , function ( ) {
108+ it ( 'the aria-selected attribute is set to "false" for all tabs that don\'t have a aria-selected attribute' , function ( ) {
109109 for ( const tab of document . querySelectorAll ( '[role="tab"]:not([aria-selected="true"])' ) ) {
110110 assert . equal ( tab . getAttribute ( 'aria-selected' ) , 'false' )
111111 }
112112 } )
113113
114- it ( 'the tabindex attribute is set to "0" for the selected tab' , function ( ) {
114+ it ( 'the tabindex attribute is set to "0" for the selected tab' , function ( ) {
115115 assert . equal ( document . querySelector ( '[role="tab"][aria-selected="true"]' ) . getAttribute ( 'tabindex' ) , '0' )
116116 } )
117117
118- it ( 'the tabindex attribute is set to "-1" for the non-selected tabs' , function ( ) {
118+ it ( 'the tabindex attribute is set to "-1" for the non-selected tabs' , function ( ) {
119119 for ( const tab of document . querySelectorAll ( '[role="tab"]:not([aria-selected="true"])' ) ) {
120120 assert . equal ( tab . getAttribute ( 'tabindex' ) , '-1' )
121121 }
122122 } )
123- it ( 'selected tab has tabindex="0" after selection' , function ( ) {
123+ it ( 'selected tab has tabindex="0" after selection' , function ( ) {
124124 const tabs = document . querySelectorAll ( '[role="tab"]' )
125125
126126 tabs [ 1 ] . click ( )
0 commit comments