Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions parts/header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!-- wp:html -->
<a class="skip-link screen-reader-text" href="#main-content">Skip to content</a>
<!-- /wp:html -->

<!-- wp:group {"tagName":"header","className":"site-header","layout":{"type":"constrained"}} -->
<header class="wp-block-group site-header">
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} -->
Expand Down
22 changes: 22 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,25 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: {{TEXT_DOMAIN}}
Tags: block-theme, full-site-editing, custom-colors, custom-typography
*/

/* Skip link: visible only when focused (keyboard / AT users).
* Keep legacy `clip` alongside `clip-path` so focus reveal still works when
* WordPress 6.4–6.7 screen-reader-text styles set clip: rect(...).
*/
.skip-link:focus {
/* stylelint-disable-next-line property-no-deprecated -- WP 6.4–6.7 compat */
clip: auto !important;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
clip-path: none !important;
height: auto !important;
width: auto !important;
position: fixed;
left: 1rem;
top: 1rem;
z-index: 100000;
padding: 0.75rem 1rem;
background: #111;
color: #fff;
text-decoration: none;
outline: 2px solid #fff;
outline-offset: 2px;
}
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- wp:template-part {"slug":"header","tagName":"header"} /-->

<!-- wp:group {"tagName":"main","layout":{"type":"constrained"}} -->
<main class="wp-block-group">
<!-- wp:group {"tagName":"main","anchor":"main-content","layout":{"type":"constrained"}} -->
<main id="main-content" class="wp-block-group" tabindex="-1">
<!-- wp:query {"query":{"perPage":10,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->
<div class="wp-block-query">
<!-- wp:post-template -->
Expand Down