v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
All checks were successful
Create Release Package / PHP Lint (push) Successful in 52s
Create Release Package / Build Release (push) Successful in 1m21s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 16:27:13 +01:00
parent cc8dc9d357
commit eb5ac6f7ad
33 changed files with 1270 additions and 39 deletions

View File

@@ -61,6 +61,7 @@
var newTheme = currentTheme === 'dark' ? 'light' : 'dark';
localStorage.setItem(STORAGE_KEY, newTheme);
setTheme(newTheme);
announceTheme(newTheme);
});
});
});
@@ -71,4 +72,23 @@
setTheme(e.matches ? 'dark' : 'light');
}
});
/**
* Announce theme change to screen readers via a live region.
*
* @param {string} theme - 'dark' or 'light'
*/
function announceTheme(theme) {
var msg = theme === 'dark' ? 'Dark mode enabled' : 'Light mode enabled';
var el = document.getElementById('wp-bootstrap-theme-status');
if (!el) {
el = document.createElement('div');
el.id = 'wp-bootstrap-theme-status';
el.setAttribute('role', 'status');
el.setAttribute('aria-live', 'polite');
el.className = 'visually-hidden';
document.body.appendChild(el);
}
el.textContent = msg;
}
})();

View File

@@ -75,3 +75,46 @@
background: var(--bs-body-bg);
}
}
// Skip link (accessibility)
.wp-bootstrap-skip-link {
position: absolute;
top: -100%;
left: 0;
z-index: $zindex-fixed + 10;
padding: 0.5rem 1rem;
background: var(--bs-primary);
color: #fff;
text-decoration: none;
font-weight: 600;
&:focus {
top: 0;
}
}
// Post featured image
.post-thumbnail {
aspect-ratio: 16 / 9;
object-fit: cover;
width: 100%;
}
// Card thumbnail
.card-thumbnail {
aspect-ratio: 3 / 2;
object-fit: cover;
}
// Sidebar heading
.sidebar-heading {
letter-spacing: 1.6px;
}
// Hero overlay
.hero-overlay {
background-position: center;
background-size: cover;
background-repeat: no-repeat;
opacity: 0.3;
}

11
src/scss/rtl.scss Normal file
View File

@@ -0,0 +1,11 @@
/*!
* WP Bootstrap Theme - RTL Overrides
* Right-to-left language support
*/
// Blockquote accent border (LTR uses border-left, RTL needs border-right)
.is-style-blockquote-accent {
border-left: none;
border-right: 4px solid var(--wp--preset--color--primary);
border-radius: 0.375rem 0 0 0.375rem;
}