Skip to content

[V2 Appbar] App Bar Focus Navigation Fix #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 11, 2025

Conversation

Dhruv-Mishra
Copy link
Collaborator

@Dhruv-Mishra Dhruv-Mishra commented Jul 10, 2025

Problem

Keyboarding focus navigation not properly working on the AppBar

Screenshots

Before After
beforeNavigationFix finalFocusableFlowAppBar

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • Automated Tests
  • Documentation and demo app examples
  • VoiceOver and Keyboard Accessibility
  • Internationalization and RTL layouts
  • Size classes and window sizes (notched devices, multitasking, different window sizes, etc)

@Copilot Copilot AI review requested due to automatic review settings July 10, 2025 09:46
@Dhruv-Mishra Dhruv-Mishra requested a review from a team as a code owner July 10, 2025 09:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors how click and tooltip behaviors are applied in the AppBar component and its underlying accessibility utility to improve focus navigation and simplify gesture handling.

  • Updates AppBar.kt to adjust modifier chaining for clickableWithTooltip
  • Refactors clickableWithTooltip in AccessibilityUtils.kt to replace custom gesture detection with combinedClickable

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
fluentui_topappbars/src/main/java/.../AppBar.kt Split the Modifier.clickableWithTooltip call onto its own chain
fluentui_core/src/main/java/.../AccessibilityUtils.kt Removed manual pointerInput + ripple logic in favor of combinedClickable
Comments suppressed due to low confidence (2)

fluentui_core/src/main/java/com/microsoft/fluentui/util/AccessibilityUtils.kt:121

  • The combinedClickable modifier is always applied even if there’s no click handler. Consider using the enabled parameter (e.g. enabled = onClick != null || onLongClick != null) to avoid creating unintentionally clickable areas.
    val clickableModifier = Modifier.combinedClickable(

fluentui_core/src/main/java/com/microsoft/fluentui/util/AccessibilityUtils.kt:12

  • Ensure that rememberRipple is imported (e.g. import androidx.compose.material.ripple.rememberRipple) so that the ripple indication compiles correctly when showRippleOnClick is true.
import androidx.compose.foundation.combinedClickable

@Dhruv-Mishra Dhruv-Mishra merged commit d7c1ef1 into master Jul 11, 2025
2 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