Skip to content

Fix(a11y): Prevent output of hidden site branding (#758)#892

Merged
robruiz merged 1 commit intowprig:developfrom
SinghCod3r:fix/accessibility-hidden-branding-758
Aug 28, 2025
Merged

Fix(a11y): Prevent output of hidden site branding (#758)#892
robruiz merged 1 commit intowprig:developfrom
SinghCod3r:fix/accessibility-hidden-branding-758

Conversation

@SinghCod3r
Copy link
Contributor

Resolves issue #758.

This pull request fixes an accessibility issue where the site title and description were visually hidden but still accessible to screen readers and keyboard navigation. This caused redundant links, loss of keyboard focus, and unnecessary screen reader chatter.

The fix updates template-parts/header/branding.php to wrap the output of the site title and description in a conditional check for the display_header_text Customizer setting. If a user has unchecked "Display Site Title and Tagline," the corresponding HTML is no longer rendered at all, providing a cleaner and more accessible user experience.

Updates branding.php to respect the 'display_header_text' Customizer setting, removing redundant links and screen reader chatter. Resolves wprig#758.
@SinghCod3r
Copy link
Contributor Author

@robruiz , please review this and merge it.

@robruiz robruiz changed the base branch from master to develop August 28, 2025 18:36
Copy link
Contributor

@robruiz robruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you for your contribution!

@robruiz robruiz merged commit f242dff into wprig:develop Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants