feat: rebuild the header controls as icon buttons
The theme switch was three labelled radios that wrapped the header onto a second line with long translations. It is three SVG buttons now, with search and menu sharing the same language: no resting outline, a filled chip for the active choice. Radios gave arrow-key roving for free, so the group reimplements it rather than losing it. The first chip colour put accent on accent and failed WCAG AA; the label carries full contrast instead. Mobile targets sit at 45px because a floor of exactly 44 rounds to 43.99997 in Firefox. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
16 files changed
+316
-156
No files matched your search
@@ -5,28 +5,7 @@
|
||||
* @package CHRNX
|
||||
*/
|
||||
|
||||
$chrnx_header_links = array(
|
||||
array(
|
||||
'label' => __( 'Journal', 'chrnx' ),
|
||||
'url' => home_url( '/journal/' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Projects', 'chrnx' ),
|
||||
'url' => home_url( '/projects/' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Music', 'chrnx' ),
|
||||
'url' => home_url( '/music/' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'Podcasts', 'chrnx' ),
|
||||
'url' => home_url( '/podcasts/' ),
|
||||
),
|
||||
array(
|
||||
'label' => __( 'About', 'chrnx' ),
|
||||
'url' => home_url( '/about/' ),
|
||||
),
|
||||
);
|
||||
$chrnx_header_links = chrnx_get_navigation_links( 'chrnx-primary' );
|
||||
$chrnx_search_label = __( 'Search', 'chrnx' );
|
||||
$chrnx_search_id = wp_unique_id( 'chrnx-search-' );
|
||||
$chrnx_search_panel_id = wp_unique_id( 'chrnx-search-panel-' );
|
||||
@@ -52,7 +31,7 @@ $chrnx_current_url = chrnx_get_current_navigation_destination();
|
||||
data-label-open="<?php echo esc_attr__( 'Open search', 'chrnx' ); ?>"
|
||||
data-label-submit="<?php echo esc_attr( $chrnx_search_label ); ?>"
|
||||
>
|
||||
<span aria-hidden="true">⌕</span>
|
||||
<?php echo chrnx_get_icon_markup( 'search' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Helper returns a fixed literal SVG. ?>
|
||||
<span class="chrnx-screen-reader-text"><?php echo esc_html( $chrnx_search_label ); ?></span>
|
||||
</button>
|
||||
</form>
|
||||
Reference in new issue
Block a user