[a11y][Glic] Add accessible labels to links in experimental opt-in dialog [chromium/src : main]

0 views
Skip to first unread message

Min Qin (Gerrit)

unread,
Jul 17, 2026, 1:30:45 PM (4 days ago) Jul 17
to Rosie Yang, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
Attention needed from David Trainor, Rosie Yang and Tommy Nyquist

Min Qin added 2 comments

File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_dialog_browsertest.cc
Line 1205, Patchset 4 (Latest): if (!safely_element.is_ok() || safely_element == base::Value()) {
Min Qin . unresolved

Returning DOM elements through `EvalJs` relies on V8's structured serialization, which yields an empty dictionary `{}` for DOM nodes. While comparing the result against `base::Value()` (which evaluates to type `NONE` for `null`) works as a null-check, it's safer and cleaner to evaluate a boolean expression over IPC.

Consider doing:
```cpp
if (EvalJs(guest_contents, "!!document.querySelector('a[href*=\"use-policy\"]')") != true) {
return false;
}
```
(The same applies to the other element existence checks below)
File chrome/browser/resources/glic/experimental_opt_in/BUILD.gn
Line 31, Patchset 4 (Latest): "//tools/typescript/definitions/tabs.d.ts",
Min Qin . unresolved

Is `tabs.d.ts` needed? It doesn't look like `chrome.tabs` is used in this file.

Open in Gerrit

Related details

Attention is currently required from:
  • David Trainor
  • Rosie Yang
  • Tommy Nyquist
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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
Gerrit-Change-Number: 8114219
Gerrit-PatchSet: 4
Gerrit-Owner: Rosie Yang <ros...@google.com>
Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Rosie Yang <ros...@google.com>
Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Rosie Yang <ros...@google.com>
Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
Gerrit-Attention: David Trainor <dtra...@chromium.org>
Gerrit-Comment-Date: Fri, 17 Jul 2026 17:30:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Rosie Yang (Gerrit)

unread,
Jul 17, 2026, 1:52:59 PM (4 days ago) Jul 17
to Min Qin, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
Attention needed from David Trainor, Min Qin and Tommy Nyquist

Rosie Yang added 2 comments

File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_dialog_browsertest.cc
Line 1205, Patchset 4: if (!safely_element.is_ok() || safely_element == base::Value()) {
Min Qin . resolved

Returning DOM elements through `EvalJs` relies on V8's structured serialization, which yields an empty dictionary `{}` for DOM nodes. While comparing the result against `base::Value()` (which evaluates to type `NONE` for `null`) works as a null-check, it's safer and cleaner to evaluate a boolean expression over IPC.

Consider doing:
```cpp
if (EvalJs(guest_contents, "!!document.querySelector('a[href*=\"use-policy\"]')") != true) {
return false;
}
```
(The same applies to the other element existence checks below)
Rosie Yang

Makes sense! Thanks! I have changed it to evaluate a boolean expression (!!document.querySelector(...)) directly in JS to make the check safer and avoid returning DOM nodes over IPC.

File chrome/browser/resources/glic/experimental_opt_in/BUILD.gn
Line 31, Patchset 4: "//tools/typescript/definitions/tabs.d.ts",
Min Qin . resolved

Is `tabs.d.ts` needed? It doesn't look like `chrome.tabs` is used in this file.

Rosie Yang

Done

Open in Gerrit

Related details

Attention is currently required from:
  • David Trainor
  • Min Qin
  • Tommy Nyquist
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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
    Gerrit-Change-Number: 8114219
    Gerrit-PatchSet: 5
    Gerrit-Owner: Rosie Yang <ros...@google.com>
    Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Rosie Yang <ros...@google.com>
    Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
    Gerrit-Attention: David Trainor <dtra...@chromium.org>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Fri, 17 Jul 2026 17:52:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Min Qin <qin...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tommy Nyquist (Gerrit)

    unread,
    Jul 17, 2026, 5:58:14 PM (4 days ago) Jul 17
    to Rosie Yang, Min Qin, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
    Attention needed from David Trainor, Min Qin and Rosie Yang

    Tommy Nyquist added 5 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Tommy Nyquist . resolved

    Reviewed with a focus on merging before translations are ready: structurally safe. All three labels are plain text with no placeholders, read via loadTimeData.getString and injected with JSON.stringify -> setAttribute('aria-label', ...), so there is no $N/substitution-count exposure, no span markers to go missing, and no sanitizer throw-path in any locale. Until translations land, non-English users will get English aria-labels over the server-localized link text — an acceptable interim given the flag doubles as a kill switch. Two landing-order coordination items and two Nits inline.

    File chrome/app/glic_strings.grdp
    Line 327, Patchset 6 (Latest): <message name="IDS_SETTINGS_GLIC_EXPERIMENTAL_TRIGGERING_CONSIDER_REVIEW_RISKS_LINK_LABEL" desc="Accessible name for the 'Review the risks' link in the Gemini Spark experimental triggering considerations list." is_accessibility_with_no_ui="true">
    Tommy Nyquist . unresolved

    Coordination: crrev.com/c/8104286 adds a message with this exact name (identical text, different desc) at the same anchor after CONSIDER_3. The second CL to land hits a grdp merge conflict, and a keep-both resolution would be a duplicate-name grit build failure. Worth agreeing which CL owns the definition; since the text is identical they would share one translation ID either way, which is the desired end state.

    File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_dialog_browsertest.cc
    Line 1211, Patchset 6 (Latest): if (!safely_label.is_ok() || safely_label != "Use Gemini safely") {
    Tommy Nyquist . unresolved

    Nit: comparing against hard-coded English literals works on the en-US bots, but it will silently drift from the grdp on the next copy tweak and can't run locale-parameterized. Comparing against l10n_util::GetStringUTF16(IDS_...) would keep the test anchored to the message.

    File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_ui.cc
    Line 141, Patchset 6 (Latest): IDS_SETTINGS_GLIC_PERMISSIONS_WEB_ACTUATION_TOGGLE_CONSIDER_SAFELY_LINK_LABEL},
    Tommy Nyquist . unresolved

    Landing-order hazard: crrev.com/c/8117346 renames these two messages to IDS_SETTINGS_GLIC_PERMISSIONS_WEB_ACTUATION_TOGGLE_CONSIDER_SAFELY_ARIA_LABEL / ..._CONSIDER_UNEXPECTED_RESULTS_ARIA_LABEL (grdp-only; same text, so translations are preserved). Because the rename and this new consumer live in different files, git merges cleanly and whichever CL lands second only breaks at CQ compile time. If 8117346 goes in first, these references need to move to the _ARIA_LABEL names.

    File chrome/browser/resources/glic/experimental_opt_in/experimental_opt_in.ts
    Line 166, Patchset 6 (Latest): if (link.href.includes('use-policy')) {
    Tommy Nyquist . unresolved

    Nit: for an SVG <a> element, link.href is an SVGAnimatedString, so .includes() would throw and kill the rest of this MutationObserver batch. The Google-hosted page presumably has no SVG anchors today, but link.getAttribute('href') (or String(link.href)) would make this robust against a future page revision.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Trainor
    • Min Qin
    • Rosie Yang
    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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
      Gerrit-Change-Number: 8114219
      Gerrit-PatchSet: 6
      Gerrit-Owner: Rosie Yang <ros...@google.com>
      Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
      Gerrit-Reviewer: Min Qin <qin...@chromium.org>
      Gerrit-Reviewer: Rosie Yang <ros...@google.com>
      Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Rosie Yang <ros...@google.com>
      Gerrit-Attention: David Trainor <dtra...@chromium.org>
      Gerrit-Attention: Min Qin <qin...@chromium.org>
      Gerrit-Comment-Date: Fri, 17 Jul 2026 21:57:59 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rosie Yang (Gerrit)

      unread,
      Jul 17, 2026, 7:17:20 PM (4 days ago) Jul 17
      to Min Qin, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
      Attention needed from David Trainor, Min Qin and Tommy Nyquist

      Rosie Yang added 4 comments

      File chrome/app/glic_strings.grdp
      Line 327, Patchset 6: <message name="IDS_SETTINGS_GLIC_EXPERIMENTAL_TRIGGERING_CONSIDER_REVIEW_RISKS_LINK_LABEL" desc="Accessible name for the 'Review the risks' link in the Gemini Spark experimental triggering considerations list." is_accessibility_with_no_ui="true">
      Tommy Nyquist . resolved

      Coordination: crrev.com/c/8104286 adds a message with this exact name (identical text, different desc) at the same anchor after CONSIDER_3. The second CL to land hits a grdp merge conflict, and a keep-both resolution would be a duplicate-name grit build failure. Worth agreeing which CL owns the definition; since the text is identical they would share one translation ID either way, which is the desired end state.

      Rosie Yang

      Thanks for pointing this out! I will keep an eye on it and rebase to drop the duplicate definition if another CL lands first.

      File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_dialog_browsertest.cc
      Line 1211, Patchset 6: if (!safely_label.is_ok() || safely_label != "Use Gemini safely") {
      Tommy Nyquist . resolved

      Nit: comparing against hard-coded English literals works on the en-US bots, but it will silently drift from the grdp on the next copy tweak and can't run locale-parameterized. Comparing against l10n_util::GetStringUTF16(IDS_...) would keep the test anchored to the message.

      Rosie Yang

      Done. I have included ui/base/l10n/l10n_util.h and updated the assertions to compare against l10n_util::GetStringUTF8(IDS_...) instead of hardcoded English strings

      File chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_ui.cc
      Line 141, Patchset 6: IDS_SETTINGS_GLIC_PERMISSIONS_WEB_ACTUATION_TOGGLE_CONSIDER_SAFELY_LINK_LABEL},
      Tommy Nyquist . resolved

      Landing-order hazard: crrev.com/c/8117346 renames these two messages to IDS_SETTINGS_GLIC_PERMISSIONS_WEB_ACTUATION_TOGGLE_CONSIDER_SAFELY_ARIA_LABEL / ..._CONSIDER_UNEXPECTED_RESULTS_ARIA_LABEL (grdp-only; same text, so translations are preserved). Because the rename and this new consumer live in different files, git merges cleanly and whichever CL lands second only breaks at CQ compile time. If 8117346 goes in first, these references need to move to the _ARIA_LABEL names.

      Rosie Yang

      thanks for letting me know, will monitor it and rebase to rename the references to _ARIA_LABEL if it lands before this CL.

      File chrome/browser/resources/glic/experimental_opt_in/experimental_opt_in.ts
      Line 166, Patchset 6: if (link.href.includes('use-policy')) {
      Tommy Nyquist . resolved

      Nit: for an SVG <a> element, link.href is an SVGAnimatedString, so .includes() would throw and kill the rest of this MutationObserver batch. The Google-hosted page presumably has no SVG anchors today, but link.getAttribute('href') (or String(link.href)) would make this robust against a future page revision.

      Rosie Yang

      Sure, have changed to use link.getAttribute('href'), right now it returns a string (or null) for both HTMLAnchorElement and SVGAElement, avoiding the SVGAnimatedString TypeError.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Trainor
      • Min Qin
      • Tommy Nyquist
      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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
        Gerrit-Change-Number: 8114219
        Gerrit-PatchSet: 7
        Gerrit-Owner: Rosie Yang <ros...@google.com>
        Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
        Gerrit-Reviewer: Min Qin <qin...@chromium.org>
        Gerrit-Reviewer: Rosie Yang <ros...@google.com>
        Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
        Gerrit-Attention: David Trainor <dtra...@chromium.org>
        Gerrit-Attention: Min Qin <qin...@chromium.org>
        Gerrit-Comment-Date: Fri, 17 Jul 2026 23:17:07 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Tommy Nyquist <nyq...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Min Qin (Gerrit)

        unread,
        Jul 17, 2026, 7:52:38 PM (4 days ago) Jul 17
        to Rosie Yang, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
        Attention needed from David Trainor, Rosie Yang and Tommy Nyquist

        Min Qin voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • David Trainor
        • Rosie Yang
        • Tommy Nyquist
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • 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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 7
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Rosie Yang <ros...@google.com>
          Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-Attention: David Trainor <dtra...@chromium.org>
          Gerrit-Comment-Date: Fri, 17 Jul 2026 23:52:26 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tommy Nyquist (Gerrit)

          unread,
          Jul 20, 2026, 7:36:20 PM (yesterday) Jul 20
          to Rosie Yang, Min Qin, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
          Attention needed from David Trainor and Rosie Yang

          Tommy Nyquist voted and added 1 comment

          Votes added by Tommy Nyquist

          Code-Review+1

          1 comment

          Patchset-level comments
          File-level comment, Patchset 7 (Latest):
          Tommy Nyquist . resolved

          lgtm

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Trainor
          • Rosie Yang
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • 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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 7
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Rosie Yang <ros...@google.com>
          Gerrit-Attention: David Trainor <dtra...@chromium.org>
          Gerrit-Comment-Date: Mon, 20 Jul 2026 23:36:10 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Min Qin (Gerrit)

          unread,
          1:46 AM (18 hours ago) 1:46 AM
          to Rosie Yang, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
          Attention needed from David Trainor, Rosie Yang and Tommy Nyquist

          Min Qin voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Trainor
          • Rosie Yang
          • Tommy Nyquist
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • 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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 8
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Rosie Yang <ros...@google.com>
          Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-Attention: David Trainor <dtra...@chromium.org>
          Gerrit-Comment-Date: Tue, 21 Jul 2026 05:46:08 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Rosie Yang (Gerrit)

          unread,
          2:15 AM (18 hours ago) 2:15 AM
          to Min Qin, Tommy Nyquist, David Trainor, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org
          Attention needed from David Trainor and Tommy Nyquist

          Rosie Yang voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Trainor
          • Tommy Nyquist
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • 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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 8
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-Attention: David Trainor <dtra...@chromium.org>
          Gerrit-Comment-Date: Tue, 21 Jul 2026 06:15:19 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          2:20 AM (18 hours ago) 2:20 AM
          to Rosie Yang, Min Qin, Tommy Nyquist, David Trainor, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          [a11y][Glic] Add accessible labels to links in experimental opt-in
          dialog

          * Add explicit aria-label attributes to the "safely",
          "unexpected_results", and "Review the risks" links inside the
          experimental opt-in dialog webview.

          * Add a new localized accessible label string for "Review the risks"
          to glic_strings.grdp.

          * Pass the localized accessible label strings to the experimental
          opt-in WebUI page.

          * Inject a script using a MutationObserver into the webview on
          content load to watch the DOM and apply aria-label attributes as
          links are rendered/updated dynamically.

          * Gate this accessibility fix behind a new feature flag
          GlicOptInDialogLinkA11yFix, and register it in chrome://flags.

          * Add a browser test case VerifyA11yLabelsInDialog in
          glic_experimental_opt_in_dialog_browsertest.cc to verify that
          link aria-labels are correctly applied to dynamic elements.
          Bug: b:535620696
          Change-Id: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Reviewed-by: Min Qin <qin...@chromium.org>
          Commit-Queue: Rosie Yang <ros...@google.com>
          Cr-Commit-Position: refs/heads/main@{#1665202}
          Files:
          • M chrome/browser/about_flags.cc
          • M chrome/browser/flag-metadata.json
          • M chrome/browser/flag_descriptions.h
          • M chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_dialog_browsertest.cc
          • M chrome/browser/glic/experimental_opt_in/glic_experimental_opt_in_ui.cc
          • M chrome/browser/glic/public/features.cc
          • M chrome/browser/glic/public/features.h
          • M chrome/browser/resources/glic/experimental_opt_in/BUILD.gn
          • M chrome/browser/resources/glic/experimental_opt_in/experimental_opt_in.ts
          • M chrome/common/chrome_features.cc
          • M chrome/test/data/webui/glic/test_data/page.html
          • M tools/metrics/histograms/enums.xml
          Change size: M
          Delta: 12 files changed, 216 insertions(+), 0 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Min Qin
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 9
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          open
          diffy
          satisfied_requirement

          Rosie Yang (Gerrit)

          unread,
          1:07 PM (7 hours ago) 1:07 PM
          to Chromium LUCI CQ, Min Qin, Tommy Nyquist, David Trainor, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org

          Rosie Yang has created a revert of this change

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: revert
          satisfied_requirement
          open
          diffy

          Tommy Nyquist (Gerrit)

          unread,
          1:10 PM (7 hours ago) 1:10 PM
          to Rosie Yang, Chromium LUCI CQ, Min Qin, David Trainor, Chromium Metrics Reviews, chromium...@chromium.org, asvitki...@chromium.org, asvitkine...@chromium.org, dewitt...@chromium.org, jmedle...@chromium.org

          Tommy Nyquist added 2 comments

          Patchset-level comments
          File-level comment, Patchset 9 (Latest):
          Tommy Nyquist . unresolved

          Post-landing thought for a follow-up: now that the opt-in page (`https://gemini.google.com/glic/intro`) is content our team owns, these aria-labels are a much better fit in that page's own markup than injected from the Chrome client via `webview.executeScript`. A persistent `MutationObserver` patching a11y onto a page we control is easy to break silently (see the href-substring matching inline) and is invisible to anyone working on the intro page itself — the labels can't be maintained alongside the visible link text they describe.

          Could we file a follow-up to add the three labels ("safely", "unexpected_results", "Review the risks") to the intro page markup directly, then remove this injection block and the `GlicOptInDialogLinkA11yFix` flag? The strings are currently pulled from Chrome's grdp; server-side they'd come from the intro page's own i18n. Happy to pair on it.

          (For contrast, crrev.com/c/8114749 fixes the *dialog-level* a11y for this same surface natively in C++ — that's the right home for the pieces Chrome actually owns; the link labels are the piece the server owns.)

          File chrome/browser/resources/glic/experimental_opt_in/experimental_opt_in.ts
          Line 173, Patchset 9 (Latest): if (href.includes('use-policy')) {
          Tommy Nyquist . resolved

          This href-substring matching (`use-policy` / `unexpected_results` / `gemini_spark_safety`) is coupled to server-configurable URL params — if any of those change, the labels silently drop with no failing test on the Chrome side. Since we own the intro page, authoring the aria-labels on the links in that page's markup (next to the visible text) avoids reconstructing them here from the URL entirely. See the patchset-level note.

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • 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: I3df1d268ca30fe381a20f24a5bf8ad23302667ad
          Gerrit-Change-Number: 8114219
          Gerrit-PatchSet: 9
          Gerrit-Owner: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: David Trainor <dtra...@chromium.org>
          Gerrit-Reviewer: Min Qin <qin...@chromium.org>
          Gerrit-Reviewer: Rosie Yang <ros...@google.com>
          Gerrit-Reviewer: Tommy Nyquist <nyq...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Comment-Date: Tue, 21 Jul 2026 17:10:23 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages