fix: harden CHRNX shell accessibility
This commit is contained in:
14 files changed
+520
-54
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Render the progressive mobile navigation toggle.
|
||||
*
|
||||
* @package CHRNX
|
||||
*/
|
||||
|
||||
$chrnx_open_label = __( 'Open primary navigation', 'chrnx' );
|
||||
$chrnx_close_label = __( 'Close primary navigation', 'chrnx' );
|
||||
?>
|
||||
<button
|
||||
<?php
|
||||
// WordPress escapes each generated wrapper attribute.
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo get_block_wrapper_attributes(
|
||||
array(
|
||||
'class' => 'chrnx-mobile-menu-toggle',
|
||||
'data-chrnx-menu-toggle' => '',
|
||||
)
|
||||
);
|
||||
?>
|
||||
type="button"
|
||||
hidden
|
||||
aria-controls="chrnx-primary-navigation"
|
||||
aria-expanded="false"
|
||||
aria-label="<?php echo esc_attr( $chrnx_open_label ); ?>"
|
||||
data-label-open="<?php echo esc_attr( $chrnx_open_label ); ?>"
|
||||
data-label-close="<?php echo esc_attr( $chrnx_close_label ); ?>"
|
||||
>
|
||||
<span aria-hidden="true">☰</span>
|
||||
</button>
|
||||
Reference in new issue
Block a user