Skip to content

fix(navbar): add missing tooltip to search icon#38527

Open
iamayushkarma wants to merge 3 commits intoRocketChat:developfrom
iamayushkarma:fix/38480-missing-tooltip
Open

fix(navbar): add missing tooltip to search icon#38527
iamayushkarma wants to merge 3 commits intoRocketChat:developfrom
iamayushkarma:fix/38480-missing-tooltip

Conversation

@iamayushkarma
Copy link

@iamayushkarma iamayushkarma commented Feb 6, 2026

Description

Tooltip was missing on navbar search magnifier icon.
Added title attribute to display tooltip on hover.

Issue

Fixes #38480

Before

before-tooltip.mp4

After

after-tooltip.mp4

Summary by CodeRabbit

  • Bug Fixes
    • Improved accessibility for the navigation bar search icon by adding a descriptive tooltip and aria-label that update depending on whether the search is active or not (e.g., "Clear search" when dirty, "Search rooms" otherwise).

@iamayushkarma iamayushkarma requested a review from a team as a code owner February 6, 2026 12:53
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 6, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2026

CLA assistant check
All committers have signed the CLA.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: 5e44888

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

Walkthrough

Added accessibility attributes to the navbar search addon icon: title and aria-label now use translated keys that switch between Clear_search when isDirty is true and Search_rooms when false.

Changes

Cohort / File(s) Summary
Accessibility Enhancement
apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx
Added title and aria-label attributes to the search addon icon; values are translations conditional on isDirty (Clear_search vs Search_rooms).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I tapped a key and gave a cheer,
The little icon learned to hear.
Now title and voice in tidy pair,
Tell "Clear" or "Search" with gentle care. 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding a missing tooltip to the navbar search icon by implementing title and aria-label attributes.
Linked Issues check ✅ Passed The PR implements the objective from #38480 by adding tooltip attributes (title and aria-label) to the search icon, improving accessibility and icon labeling as required.
Out of Scope Changes check ✅ Passed All changes are focused solely on adding accessibility attributes to the navbar search icon, remaining in scope with the linked issue objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1368e2b and 5e44888.

📒 Files selected for processing (1)
  • apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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 and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx`:
- Line 89: The tooltip currently always shows t('Search_rooms') even when
isDirty switches the Icon to 'cross'; update the Icon's title prop in
NavBarSearch.tsx to reflect the current action by using a conditional based on
isDirty (e.g., title={isDirty ? t('Clear') : t('Search_rooms')}) so the tooltip
matches the cross (clear) vs magnifier (search) state, keeping the existing
onClick handler handleClearText as appropriate.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac9065f and 1368e2b.

📒 Files selected for processing (1)
  • apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/client/navbar/NavBarSearch/NavBarSearch.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@iamayushkarma
Copy link
Author

Added aria-label for accessibility improvement.

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