Skip to content

Conversation

israelcefrin
Copy link
Collaborator

@israelcefrin israelcefrin commented Sep 25, 2025

Fixes the missing text description for the search component adding a hidden heading level 2 (h2) to the Google search component since it doesn't allow us to add an aria-label parameter.
Issue: #1367

{% endif %}
<script async src="https://cse.google.com/cse.js?cx=342127f3c8880483d">
</script>
<h2 class="-screenReader" id="search">Search PKP documentation</h2>
Copy link
Member

Choose a reason for hiding this comment

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

Hi @israelcefrin, we typically avoid putting the text labels directly into the templates - could you instead add the text as a new entry in _data/site.yml, then reference it in the two templates here, e.g. <h2 class="-screenReader" id="search">{{ site.data.site.searchHeading }}</h2>

@kaitlinnewson
Copy link
Member

Hi @israelcefrin, one comment for review - thanks!

@israelcefrin
Copy link
Collaborator Author

Hello @kaitlinnewson , thanks for reviewing it. I've added the text label to the yml file and referenced it in the template as well.

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.

A11Y - Search component missing description text (aria-label)
2 participants