[a11y][clarity] Addressing launch a11y feedback for anchored messages [chromium/src : main]

0 views
Skip to first unread message

Kaan Alsan (Gerrit)

unread,
10:40 AM (9 hours ago) 10:40 AM
to Dmytro Yeroshkin, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, srahim...@chromium.org
Attention needed from Dmytro Yeroshkin

Kaan Alsan added 3 comments

File chrome/browser/ui/views/page_action/anchored_message_view.cc
Line 509, Patchset 8 (Latest):void AnchoredMessageBubbleView::OnKeyEvent(ui::KeyEvent* event) {
Kaan Alsan . unresolved

Not sure if this analysis is correct, but worth double checking:

Please fix this WARNING reported by autoreview issue finding: Is this `OnKeyEvent` override actually needed in production code?\n\nTypically, when a `views::MenuRunner` is open, the menu's own widget/controller receives and handles the `Escape` key to close the menu, so the bubble view shouldn't receive it.\n\nIf this was added because the `FocusRestoredToMenuButtonAfterMenuDismissed` unit test was failing to close the menu on `Escape`, the issue in the test is likely that the `ui::test::EventGenerator` is constructed using the bubble's root window (`views::GetRootWindow(view->GetWidget())`). This causes the simulated `Escape` event to bypass the menu's popup widget and go straight to the bubble view.

File chrome/browser/ui/views/page_action/page_action_view.cc
Line 597, Patchset 8 (Latest): tooltip_text += u" - " + anchored_message_showing;
Kaan Alsan . unresolved

This assumes all locales use this sentence structure, which may not be the case for all languages. We should define a new message in the .grd file, leveraging placeholders.

go/concat-considered-harmful

File chrome/browser/ui/views/page_action/page_action_view_unittest.cc
Line 411, Patchset 8 (Latest): kTestText + u" - Anchored message showing");
Kaan Alsan . unresolved

Let's use resource ID so that this doesn't fail when changing the text or running the test using a different locale.

Open in Gerrit

Related details

Attention is currently required from:
  • Dmytro Yeroshkin
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: Ieb889270ccd94e46523326cd0594d841df5683ea
Gerrit-Change-Number: 8054368
Gerrit-PatchSet: 8
Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Kaan Alsan <al...@chromium.org>
Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Jul 2026 14:40:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Dmytro Yeroshkin (Gerrit)

unread,
12:30 PM (7 hours ago) 12:30 PM
to Kaan Alsan, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, srahim...@chromium.org
Attention needed from Kaan Alsan

Dmytro Yeroshkin added 1 comment

File chrome/browser/ui/views/page_action/anchored_message_view.cc
Line 509, Patchset 8 (Latest):void AnchoredMessageBubbleView::OnKeyEvent(ui::KeyEvent* event) {
Kaan Alsan . unresolved

Not sure if this analysis is correct, but worth double checking:

Please fix this WARNING reported by autoreview issue finding: Is this `OnKeyEvent` override actually needed in production code?\n\nTypically, when a `views::MenuRunner` is open, the menu's own widget/controller receives and handles the `Escape` key to close the menu, so the bubble view shouldn't receive it.\n\nIf this was added because the `FocusRestoredToMenuButtonAfterMenuDismissed` unit test was failing to close the menu on `Escape`, the issue in the test is likely that the `ui::test::EventGenerator` is constructed using the bubble's root window (`views::GetRootWindow(view->GetWidget())`). This causes the simulated `Escape` event to bypass the menu's popup widget and go straight to the bubble view.

Dmytro Yeroshkin

The test was passing even without this. This was done to address a weird behaviour in a local build when testing the initial simpler fix: escaping out of the menu would close it, focus would go to the menu button for a fraction of a second, then move away from it.

I'm very much open to other idea for how to fix this.

Open in Gerrit

Related details

Attention is currently required from:
  • Kaan Alsan
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: Ieb889270ccd94e46523326cd0594d841df5683ea
Gerrit-Change-Number: 8054368
Gerrit-PatchSet: 8
Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Kaan Alsan <al...@chromium.org>
Gerrit-Attention: Kaan Alsan <al...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Jul 2026 16:30:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kaan Alsan <al...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kaan Alsan (Gerrit)

unread,
1:05 PM (7 hours ago) 1:05 PM
to Dmytro Yeroshkin, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, srahim...@chromium.org
Attention needed from Dmytro Yeroshkin

Kaan Alsan added 1 comment

File chrome/browser/ui/views/page_action/anchored_message_view.cc
Line 509, Patchset 8 (Latest):void AnchoredMessageBubbleView::OnKeyEvent(ui::KeyEvent* event) {
Kaan Alsan . resolved

Not sure if this analysis is correct, but worth double checking:

Please fix this WARNING reported by autoreview issue finding: Is this `OnKeyEvent` override actually needed in production code?\n\nTypically, when a `views::MenuRunner` is open, the menu's own widget/controller receives and handles the `Escape` key to close the menu, so the bubble view shouldn't receive it.\n\nIf this was added because the `FocusRestoredToMenuButtonAfterMenuDismissed` unit test was failing to close the menu on `Escape`, the issue in the test is likely that the `ui::test::EventGenerator` is constructed using the bubble's root window (`views::GetRootWindow(view->GetWidget())`). This causes the simulated `Escape` event to bypass the menu's popup widget and go straight to the bubble view.

Dmytro Yeroshkin

The test was passing even without this. This was done to address a weird behaviour in a local build when testing the initial simpler fix: escaping out of the menu would close it, focus would go to the menu button for a fraction of a second, then move away from it.

I'm very much open to other idea for how to fix this.

Kaan Alsan

Acknowledged - In that case I don't think it's a big deal to leave this override

Open in Gerrit

Related details

Attention is currently required from:
  • Dmytro Yeroshkin
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: Ieb889270ccd94e46523326cd0594d841df5683ea
Gerrit-Change-Number: 8054368
Gerrit-PatchSet: 8
Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Reviewer: Kaan Alsan <al...@chromium.org>
Gerrit-Attention: Dmytro Yeroshkin <yero...@chromium.org>
Gerrit-Comment-Date: Thu, 09 Jul 2026 17:05:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kaan Alsan <al...@chromium.org>
Comment-In-Reply-To: Dmytro Yeroshkin <yero...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Dmytro Yeroshkin (Gerrit)

unread,
2:45 PM (5 hours ago) 2:45 PM
to Kaan Alsan, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, srahim...@chromium.org
Attention needed from Kaan Alsan

Dmytro Yeroshkin added 2 comments

File chrome/browser/ui/views/page_action/page_action_view.cc
Line 597, Patchset 8: tooltip_text += u" - " + anchored_message_showing;
Kaan Alsan . resolved

This assumes all locales use this sentence structure, which may not be the case for all languages. We should define a new message in the .grd file, leveraging placeholders.

go/concat-considered-harmful

Dmytro Yeroshkin

Done. I kept the existing formatting for the tooltip text `{page action tooltip} - Anchored message showing`, but now it's using a formatted grd string.

File chrome/browser/ui/views/page_action/page_action_view_unittest.cc
Line 411, Patchset 8: kTestText + u" - Anchored message showing");
Kaan Alsan . resolved

Let's use resource ID so that this doesn't fail when changing the text or running the test using a different locale.

Dmytro Yeroshkin

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Kaan Alsan
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: Ieb889270ccd94e46523326cd0594d841df5683ea
    Gerrit-Change-Number: 8054368
    Gerrit-PatchSet: 9
    Gerrit-Owner: Dmytro Yeroshkin <yero...@chromium.org>
    Gerrit-Reviewer: Dmytro Yeroshkin <yero...@chromium.org>
    Gerrit-Reviewer: Kaan Alsan <al...@chromium.org>
    Gerrit-Attention: Kaan Alsan <al...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 18:45:19 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages