Skip to content

fix(search): move focus ring to the search form container - #288

Open
GautamVhavle wants to merge 1 commit into
siemens:mainfrom
GautamVhavle:fix/search-focus-outline-overlap
Open

GautamVhavle wants to merge 1 commit into
siemens:mainfrom
GautamVhavle:fix/search-focus-outline-overlap

Conversation

@GautamVhavle

@GautamVhavle GautamVhavle commented Aug 30, 2026

Copy link
Copy Markdown

What

Fixes the focus outline on the site search input so it no longer overlaps the search icon, text, and clear button in dark theme (and light theme too).

Why

The global input:focus style from @siemens/ix draws an offset outline directly on the <input>. On the search field that ring sits inside the surrounding .aa-Form container, so it overlapped the form border and crowded the icons.

Fix

  • Suppress the outline on .aa-Input itself.
  • Show the focus ring on the .aa-Form container instead (:focus-within), which already has room around it.

Verified locally in both themes by building and serving the site and focusing the search input.

Fixes #290

The global input styles from @siemens/ix apply an offset focus outline to
every input on the site. On the search field that ring was painted inside
the surrounding form, so it overlapped the form border, the submit icon
and the clear button.

The input no longer draws its own outline; the form container shows the
focus ring instead.

Fixes siemens/ix#2751
@GautamVhavle
GautamVhavle requested a review from a team as a code owner August 30, 2026 23:43
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ac818590-ffbe-42d8-a0f7-65af8d75df30

📥 Commits

Reviewing files that changed from the base of the PR and between 76e86b8 and c1945bd.

📒 Files selected for processing (1)
  • src/scss/overwrite/_searchBar.scss

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The search bar stylesheet adds a focus outline to .aa-Form and suppresses conflicting focus styles on .aa-Input.

Changes

Search bar focus styling

Layer / File(s) Summary
Search bar focus state styling
src/scss/overwrite/_searchBar.scss
.aa-Form:focus-within adds a themed focus outline. Focused .aa-Input elements suppress outline and box-shadow styles with !important declarations.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to c1945

This localized styling change moves the search focus ring to the surrounding form container to prevent visual overlap; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: nuke-ellington

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the search focus ring from the input to the surrounding form container.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@danielleroux danielleroux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@GautamVhavle Can you have a look into this:
image

There are two outlines one for the complete input (combined) and one for the "clear" button if Tab further. There should only be the one on the clear button if tab set focus on clear.

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.

UX Issue: Visual Border Conflict and Input Overlap in Search Component

2 participants