equal
deleted
inserted
replaced
126 } |
126 } |
127 |
127 |
128 $skip_link_styles = ' |
128 $skip_link_styles = ' |
129 .skip-link.screen-reader-text { |
129 .skip-link.screen-reader-text { |
130 border: 0; |
130 border: 0; |
131 clip: rect(1px,1px,1px,1px); |
|
132 clip-path: inset(50%); |
131 clip-path: inset(50%); |
133 height: 1px; |
132 height: 1px; |
134 margin: -1px; |
133 margin: -1px; |
135 overflow: hidden; |
134 overflow: hidden; |
136 padding: 0; |
135 padding: 0; |
139 word-wrap: normal !important; |
138 word-wrap: normal !important; |
140 } |
139 } |
141 |
140 |
142 .skip-link.screen-reader-text:focus { |
141 .skip-link.screen-reader-text:focus { |
143 background-color: #eee; |
142 background-color: #eee; |
144 clip: auto !important; |
|
145 clip-path: none; |
143 clip-path: none; |
146 color: #444; |
144 color: #444; |
147 display: block; |
145 display: block; |
148 font-size: 1em; |
146 font-size: 1em; |
149 height: auto; |
147 height: auto; |
201 } |
199 } |
202 |
200 |
203 // Create the skip link. |
201 // Create the skip link. |
204 skipLink = document.createElement( 'a' ); |
202 skipLink = document.createElement( 'a' ); |
205 skipLink.classList.add( 'skip-link', 'screen-reader-text' ); |
203 skipLink.classList.add( 'skip-link', 'screen-reader-text' ); |
|
204 skipLink.id = 'wp-skip-link'; |
206 skipLink.href = '#' + skipLinkTargetID; |
205 skipLink.href = '#' + skipLinkTargetID; |
207 skipLink.innerHTML = '<?php /* translators: Hidden accessibility text. */ esc_html_e( 'Skip to content' ); ?>'; |
206 skipLink.innerText = '<?php /* translators: Hidden accessibility text. Do not use HTML entities ( , etc.). */ esc_html_e( 'Skip to content' ); ?>'; |
208 |
207 |
209 // Inject the skip link. |
208 // Inject the skip link. |
210 sibling.parentElement.insertBefore( skipLink, sibling ); |
209 sibling.parentElement.insertBefore( skipLink, sibling ); |
211 }() ); |
210 }() ); |
212 </script> |
211 </script> |