[Vertical Tabs] Sets action button min touch target to 48dpx48dp [chromium/src : main]

0 views
Skip to first unread message

Joel Tan-Aristy (Gerrit)

unread,
6:25 PM (3 hours ago) 6:25 PM
to Gazal Agarwal, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
Attention needed from Gazal Agarwal

Joel Tan-Aristy voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Gazal Agarwal
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
Gerrit-Change-Number: 8133177
Gerrit-PatchSet: 2
Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
Gerrit-Attention: Gazal Agarwal <aga...@google.com>
Gerrit-Comment-Date: Wed, 22 Jul 2026 22:25:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Gazal Agarwal (Gerrit)

unread,
7:01 PM (2 hours ago) 7:01 PM
to Joel Tan-Aristy, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
Attention needed from Joel Tan-Aristy

Gazal Agarwal added 3 comments

File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinder.java
Line 295, Patchset 2 (Latest): if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(view.getContext())) {
Gazal Agarwal . unresolved

This includes AL as well (use `isTablet && !isDesktop`).
Let's wait on Julia to confirm the size of the button.

Line 365, Patchset 2 (Latest): actionButton.getHitRect(rect);
int minTouchTargetPx =
view.getResources().getDimensionPixelSize(R.dimen.min_touch_target_size);

if (rect.width() < minTouchTargetPx) {
int deltaX = (minTouchTargetPx - rect.width()) / 2;
rect.left -= deltaX;
rect.right += deltaX;
}
if (rect.height() < minTouchTargetPx) {
int deltaY = (minTouchTargetPx - rect.height()) / 2;
rect.top -= deltaY;
rect.bottom += deltaY;
}
view.setTouchDelegate(new TouchDelegate(rect, actionButton));
Gazal Agarwal . unresolved

We should defer this until after layout, by wrapping it in `view.post(...)`.

Would also be good to check actionButton.isAttachedToWindow() and actionButton.getVisibility() before setting the touch delegate.

File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinderUnitTest.java
Line 94, Patchset 2 (Latest): android.content.res.Configuration config = mActivity.getResources().getConfiguration();
Gazal Agarwal . unresolved

inline fqn

Open in Gerrit

Related details

Attention is currently required from:
  • Joel Tan-Aristy
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
    Gerrit-Change-Number: 8133177
    Gerrit-PatchSet: 2
    Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
    Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Attention: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:01:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joel Tan-Aristy (Gerrit)

    unread,
    7:22 PM (2 hours ago) 7:22 PM
    to Gazal Agarwal, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Gazal Agarwal

    Joel Tan-Aristy voted and added 3 comments

    Votes added by Joel Tan-Aristy

    Auto-Submit+0
    Commit-Queue+1

    3 comments

    File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinder.java
    Line 295, Patchset 2: if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(view.getContext())) {
    Gazal Agarwal . unresolved

    This includes AL as well (use `isTablet && !isDesktop`).
    Let's wait on Julia to confirm the size of the button.

    Joel Tan-Aristy

    Added Checks for isTablet && !isDesktop. Will hold this cl until confirmation from Julia is recieved

    Line 365, Patchset 2: actionButton.getHitRect(rect);

    int minTouchTargetPx =
    view.getResources().getDimensionPixelSize(R.dimen.min_touch_target_size);

    if (rect.width() < minTouchTargetPx) {
    int deltaX = (minTouchTargetPx - rect.width()) / 2;
    rect.left -= deltaX;
    rect.right += deltaX;
    }
    if (rect.height() < minTouchTargetPx) {
    int deltaY = (minTouchTargetPx - rect.height()) / 2;
    rect.top -= deltaY;
    rect.bottom += deltaY;
    }
    view.setTouchDelegate(new TouchDelegate(rect, actionButton));
    Gazal Agarwal . resolved

    We should defer this until after layout, by wrapping it in `view.post(...)`.

    Would also be good to check actionButton.isAttachedToWindow() and actionButton.getVisibility() before setting the touch delegate.

    Joel Tan-Aristy

    Added the post and additional checks.

    File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinderUnitTest.java
    Line 94, Patchset 2: android.content.res.Configuration config = mActivity.getResources().getConfiguration();
    Gazal Agarwal . resolved

    inline fqn

    Joel Tan-Aristy

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gazal Agarwal
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
    Gerrit-Change-Number: 8133177
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
    Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Attention: Gazal Agarwal <aga...@google.com>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:21:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Gazal Agarwal <aga...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joel Tan-Aristy (Gerrit)

    unread,
    7:22 PM (2 hours ago) 7:22 PM
    to Neil Coronado, Gazal Agarwal, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Gazal Agarwal and Neil Coronado

    Joel Tan-Aristy added 1 comment

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    Joel Tan-Aristy . resolved

    Neil for Dimen owners!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gazal Agarwal
    • Neil Coronado
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
    Gerrit-Change-Number: 8133177
    Gerrit-PatchSet: 3
    Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
    Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-Reviewer: Neil Coronado <ne...@google.com>
    Gerrit-Attention: Neil Coronado <ne...@google.com>
    Gerrit-Comment-Date: Wed, 22 Jul 2026 23:22:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joel Tan-Aristy (Gerrit)

    unread,
    7:51 PM (1 hour ago) 7:51 PM
    to Neil Coronado, Gazal Agarwal, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Gazal Agarwal and Neil Coronado

    Joel Tan-Aristy voted and added 1 comment

    Votes added by Joel Tan-Aristy

    Auto-Submit+1

    1 comment

    File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinder.java
    Line 295, Patchset 2: if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(view.getContext())) {
    Gazal Agarwal . resolved

    This includes AL as well (use `isTablet && !isDesktop`).
    Let's wait on Julia to confirm the size of the button.

    Joel Tan-Aristy

    Added Checks for isTablet && !isDesktop. Will hold this cl until confirmation from Julia is recieved

    Joel Tan-Aristy

    Confirmed with Julia, 40x48!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gazal Agarwal
    • Neil Coronado
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
      Gerrit-Change-Number: 8133177
      Gerrit-PatchSet: 3
      Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
      Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      Gerrit-Attention: Gazal Agarwal <aga...@google.com>
      Gerrit-Attention: Neil Coronado <ne...@google.com>
      Gerrit-Comment-Date: Wed, 22 Jul 2026 23:50:51 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Joel Tan-Aristy <jtana...@google.com>
      Comment-In-Reply-To: Gazal Agarwal <aga...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Neil Coronado (Gerrit)

      unread,
      8:28 PM (1 hour ago) 8:28 PM
      to Joel Tan-Aristy, Gazal Agarwal, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
      Attention needed from Gazal Agarwal and Joel Tan-Aristy

      Neil Coronado voted and added 3 comments

      Votes added by Neil Coronado

      Code-Review+1

      3 comments

      File chrome/android/features/tab_ui/java/res/values/dimens.xml
      Line 220, Patchset 3 (Latest): <dimen name="vertical_tab_action_button_touch_target_height">40dp</dimen>
      Neil Coronado . unresolved

      dimens lgtm, but should the description say the min touch target is 48x40dp?

      File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinder.java
      Line 295, Patchset 2: if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(view.getContext())) {
      Gazal Agarwal . resolved

      This includes AL as well (use `isTablet && !isDesktop`).
      Let's wait on Julia to confirm the size of the button.

      Joel Tan-Aristy

      Added Checks for isTablet && !isDesktop. Will hold this cl until confirmation from Julia is recieved

      Joel Tan-Aristy

      Confirmed with Julia, 40x48!

      Neil Coronado

      I'm a bit surprised we're using 48x40dp here.

      we use this touch target size for the horizontal tab strip, but that's considered an edge case, since the horizontal tab strip itself is only 40dp tall, and it's non-trivial to increase its height (tl;dr it'd result in less webcontents space, potentially affecting search metrics, etc.).

      the horizontal tab strip was given an exception to do this, since there's alternatives to its actions that _are_ a11y-compliant (in the GTS, etc.).

      I wouldn't block on this, but I would have assumed that we _could_ support a true 48x48dp target for VT, given that it doesn't have the same height constraints (though I'm not sure how easy or hard that would be to support... e.g. if we have to actually reposition/resize views). If that _is_ the case, then maybe we add a TODO to revisit.

      Line 360, Patchset 3 (Latest): view.setTouchDelegate(null);
      Neil Coronado . unresolved

      do we need to reset the touch delegate when the view is invisible? i.e. does the touch delegate not get ignored when the view is invisible?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Gazal Agarwal
      • Joel Tan-Aristy
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
      Gerrit-Change-Number: 8133177
      Gerrit-PatchSet: 3
      Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
      Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      Gerrit-Attention: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Attention: Gazal Agarwal <aga...@google.com>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 00:27:44 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Gazal Agarwal (Gerrit)

      unread,
      8:39 PM (21 minutes ago) 8:39 PM
      to Joel Tan-Aristy, Neil Coronado, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
      Attention needed from Joel Tan-Aristy

      Gazal Agarwal added 1 comment

      File chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/vertical_tabs/TabVerticalViewBinder.java
      Line 295, Patchset 2: if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(view.getContext())) {
      Gazal Agarwal . unresolved

      This includes AL as well (use `isTablet && !isDesktop`).
      Let's wait on Julia to confirm the size of the button.

      Joel Tan-Aristy

      Added Checks for isTablet && !isDesktop. Will hold this cl until confirmation from Julia is recieved

      Gazal Agarwal

      Joel: Forgot to update the check to tablet only?
      Neil: The min height for VT tabs on tablets will be 40dp as well. I'm guessing that's the reason behind this number.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joel Tan-Aristy
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I4339257d11161063fc730ed3e9592c66b5c2e849
      Gerrit-Change-Number: 8133177
      Gerrit-PatchSet: 3
      Gerrit-Owner: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
      Gerrit-Reviewer: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Reviewer: Neil Coronado <ne...@google.com>
      Gerrit-Attention: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 00:39:13 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages