@@ -67,7 +67,7 @@ class PfeModal extends PFElement {
6767 this . openModal = this . openModal . bind ( this ) ;
6868 this . closeModal = this . closeModal . bind ( this ) ;
6969
70- this . _modalWrapper = this . shadowRoot . querySelector ( `.${ this . tag } __wrapper ` ) ;
70+ this . _modalWindow = this . shadowRoot . querySelector ( `.${ this . tag } __window ` ) ;
7171 this . _modalCloseButton = this . shadowRoot . querySelector ( `.${ this . tag } __close` ) ;
7272 this . _overlay = this . shadowRoot . querySelector ( `.${ this . tag } __overlay` ) ;
7373 this . _container = this . shadowRoot . querySelector ( `.${ this . tag } __container` ) ;
@@ -123,16 +123,16 @@ class PfeModal extends PFElement {
123123
124124 if ( this . header ) {
125125 this . header . setAttribute ( "id" , this . header_id ) ;
126- this . _modalWrapper . setAttribute ( "aria-labelledby" , this . header_id ) ;
126+ this . _modalWindow . setAttribute ( "aria-labelledby" , this . header_id ) ;
127127 } else {
128128 // @TODO Do something else to assign the label
129129 this . _container . setAttribute ( "no_header" , "" ) ;
130130 const headings = this . body . filter ( el => el . tagName . startsWith ( "H" ) ) ;
131131 if ( headings . length > 0 ) {
132132 headings [ 0 ] . setAttribute ( "id" , this . header_id ) ;
133- this . _modalWrapper . setAttribute ( "aria-labelledby" , this . header_id ) ;
133+ this . _modalWindow . setAttribute ( "aria-labelledby" , this . header_id ) ;
134134 } else if ( this . trigger ) {
135- this . _modalWrapper . setAttribute ( "aria-label" , this . trigger . innerText ) ;
135+ this . _modalWindow . setAttribute ( "aria-label" , this . trigger . innerText ) ;
136136 }
137137 }
138138
@@ -145,7 +145,7 @@ class PfeModal extends PFElement {
145145 case "Tab" :
146146 if ( event . target === this . _modalCloseButton ) {
147147 event . preventDefault ( ) ;
148- this . _modalWrapper . focus ( ) ;
148+ this . _modalWindow . focus ( ) ;
149149 }
150150 return ;
151151 case "Escape" :
@@ -164,15 +164,15 @@ class PfeModal extends PFElement {
164164 if ( event . detail . open ) {
165165 this . open = true ;
166166 // Reveal the container and overlay
167- this . _modalWrapper . removeAttribute ( "hidden" ) ;
167+ this . _modalWindow . removeAttribute ( "hidden" ) ;
168168 this . _overlay . removeAttribute ( "hidden" ) ;
169169 this . _outer . removeAttribute ( "hidden" ) ;
170170 // Set the focus to the container
171- this . _modalWrapper . focus ( ) ;
171+ this . _modalWindow . focus ( ) ;
172172 } else {
173173 this . open = false ;
174174 // Hide the container and overlay
175- this . _modalWrapper . setAttribute ( "hidden" , true ) ;
175+ this . _modalWindow . setAttribute ( "hidden" , true ) ;
176176 this . _overlay . setAttribute ( "hidden" , true ) ;
177177 this . _outer . setAttribute ( "hidden" , true ) ;
178178 // Move focus back to the trigger element
0 commit comments