Skip to content

fix: search toggle - correct aria attributes and safari icon alignment#243

Merged
kaseybon merged 2 commits intomainfrom
fix-a11y-search-toggle
Apr 7, 2026
Merged

fix: search toggle - correct aria attributes and safari icon alignment#243
kaseybon merged 2 commits intomainfrom
fix-a11y-search-toggle

Conversation

@jawinn
Copy link
Copy Markdown
Collaborator

@jawinn jawinn commented Apr 3, 2026

Summary of changes

Add aria-controls and the corrected values for aria-expanded on the main navigation toggle search button, so the button is properly announced as expanded or collapsed.

Screenshot 2026-04-03 at 4 01 30 PM Screenshot 2026-04-03 at 4 00 34 PM

Also adds a CSS fix for Safari's alignment of the search icon (existing issue), noticed during browser testing:
Screenshot 2026-04-03 at 5 03 30 PM

Test URLs:

Checklist

  • This PR has code changes, and our linters still pass.
  • This PR has new code, so new tests were added or updated, and they pass.
  • This PR affects production code, so it was browser tested (see below).
  • This PR has copy changes, so copy was proofread and approved.
  • The content of this PR requires documentation, so we added a detailed description of the component's purpose, requirements, quirks, and instructions for use by designers and developers. This includes accessibility information if pertinent.

Validation

  1. Make sure all PR checks have passed.
  2. Pull down all related branches.
  3. Confirm screen reader announcement of collapsed and expanded on search toggle button.
  4. Confirm existence and values of aria-controls and aria-expanded on search toggle button.
  5. Confirm CSS fix for search icon alignment in Safari.

Browser Testing

We should aim to support the latest version of the listed browsers. For older versions or other browsers not on the list, content should be accessible, even if it doesn't completely match the designs.

Developers should test as they work in the browsers available on their machines. If they have access to other devices to test other browser/OS combinations, they should do that when possible.

Windows

  • Firefox
  • Chrome
  • Edge

MacOS

  • Firefox
  • Chrome
  • Safari
  • Edge

Android

  • Firefox
  • Chrome
  • Edge

iOS

  • Safari

Add aria-controls and the corrected values for aria-expanded on the
main navigation toggle search button, so the button is properly
announced as expanded or collapsed.
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync bot commented Apr 3, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync bot commented Apr 3, 2026

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

color: var(--spectrum-gray-600);

em {
& em {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note: just happened on this one; fixing for the older Safari nesting syntax that got updated in other places.

@jawinn jawinn changed the title fix: search toggle - correct aria attributes fix: search toggle - correct aria attributes and safari icon alignment Apr 3, 2026
@kaseybon kaseybon merged commit 04df40e into main Apr 7, 2026
5 checks passed
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