Skip to content

[Bug] Screen reader cannot read chat messages one at a time in the Companion window #1944

Open

Description

@fire0220

Environment

  • Windows 11 (x64), OpenClaw Companion 2026.9.8-1 installed build, native WinUI tray app, gateway connected.
  • NVDA, laptop keyboard layout, Caps Lock as the NVDA key. NVDA does not offer browse mode outside web content, so all reading must come from UI Automation items.
  • Code paths below re-checked against main at a4dd026c.

Steps to reproduce

  1. Open the Companion window with a conversation that contains at least two messages.
  2. Press Tab until focus reaches the chat history. NVDA announces "Chat messages" and nothing else.
  3. Press Up / Down. Focus does not move between messages and nothing is read.
  4. Send a request that runs several tools, expand the activity card, and Tab through its rows. Every row is announced with the same name, for example "Tool call exec. Done.".

Actual behavior

  • The whole transcript is one unnamed group. Individual messages are not automation items, so a screen reader cannot read who said what, in order, and cannot reach the copy and read-aloud buttons that live inside each message.
  • An expanded activity card lists tool calls that share one automation name, so a list of several calls cannot be followed.

Expected behavior

  • Each message is an automation item: Tab enters the list, Up / Down move between messages, each message announces its sender and text, and Tab continues to the per-message actions.
  • Each tool call inside an activity announces its position and enough input detail to tell it apart from the others.

Evidence

UI Automation dump of the main window, gateway connected:

[List] name='Chat messages'
  [ListItem] name='ItemContainer' focusable=False

Before any fix the only item the reader can reach is the list itself. Expanded activity rows (with several calls) already render this way on main:

[Button] name='Tool call exec. Done.'
[Button] name='Tool call exec. Done.'
...

Root cause

src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:

  • line 156: .IsTabStop(false) on every ItemContainer(...);
  • the container is never given an automation name;
  • line 181: only the ItemsView is named ("Chat messages");
  • SelectionMode = None and IsItemInvokedEnabled = false, so there is no focus model either.

The text elements inside a row do carry names, but they are plain elements without automation peers, so they never surface as items.

src/OpenClaw.Tray.WinUI/Chat/ToolCallCardRenderer.cs:

  • line 73: BuildStandalone(...) names every expander "{Chat_Tool_CallLabel} {toolName}. {statusLabel}.";
  • BuildActivityCore(...) maps activity.Tools.Select(tool => BuildStandalone(..., isNested: true)) without any index or input detail, so rows that share one status are identical.

Proposed solution

  1. In the ItemsView item factory, build the row content once and derive the container name from it:
    var content = BuildRow(...);
    var name = content!.Modifiers!.AutomationName;
    Prefix user messages with a sender label. For activity rows, whose name lives on the inner expander, fall back to a summary built from row.Activity?.Summary.
  2. Name the container and make it a Tab stop only when it has a name:
    ItemContainer(Border(content!))
        ...
        .IsTabStop(!string.IsNullOrEmpty(name))
    then .AutomationName(name) for non-empty names.
  3. Keep the ItemsView name so the user still hears the list itself.
  4. Add two resource keys in all six resource files: a user sender label (Chat_Timeline_UserSenderLabel) and an activity summary format (Chat_Activity_AutomationSummaryFormat, with the activity summary and the tool count).
  5. For tool calls: add int position = 0, int total = 0 to BuildStandalone, keep "Tool call <name>. <status>." as the stable prefix, then append an ordinal (new key Chat_Tool_CallPositionFormat, value like {0} of {1}) and the first line of the input (trimmed to about 120 characters with an ellipsis). Pass index + 1 and activity.Tools.Count from BuildActivityCore.
  6. Tests:
    • extend the source assertions in tests/OpenClaw.Tray.Tests/ChatTimelinePresentationTests.cs for the new calls and keys;
    • in tests/OpenClaw.Tray.UITests/ReactorToolActivityProofTests.cs, assert that the nested rows have distinct automation names;
    • in the same project, add a proof that dumps ControlType.ListItem names from the chat window and checks focusability.
  7. Existing proof tests that match "Tool call Bash. Done." exactly (NativeToolIdentityScreenshotProofTests.cs) need prefix matching because of the suffix.

Validation plan

  • dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj -c Debug -p:Platform=x64
  • dotnet build tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 and the focused UI proof tests with OPENCLAW_REPO_ROOT set.
  • Manual NVDA pass: Tab into the list, Up/Down through messages, Tab to copy/read-aloud, expand an activity and arrow through the tool rows.

Scope

Screen reader access only. No localization content is requested here; the two new resource keys are keys the automation names need, with English values provided by the implementer, and translations can follow the repository localization process.

Activity

  1. added
    clawsweeper:intake:bug
    P1
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    no-stale
    and removed
    clawsweeper:intake:bug
    on Oct 31, 2026
  2. clawsweeper commented on Oct 31, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep open: current main retains the reported message-container accessibility defects and indistinguishable tool-call names, with no identified PR owning the repair.

    Reproducibility: Current source confirms unnamed, non-tab-stop message containers and identical labels for same-name, same-status tool calls; the reporter supplies NVDA steps and a UIA dump, but this review performed no live reproduction.

    Next step
    Establish failing regressions for message focus and repeated tool announcements, then repair the existing timeline and tool-renderer accessibility paths.

    Review details

    Best possible solution:

    Provide named, keyboard-navigable message items and distinguishable tool announcements while preserving virtualization and message actions.

    Do we have a high-confidence way to reproduce the issue?

    Current source confirms unnamed, non-tab-stop message containers and identical labels for same-name, same-status tool calls; the reporter supplies NVDA steps and a UIA dump, but this review performed no live reproduction.

    Is this the best way to solve the issue?

    Repair the existing automation and focus contract in its current owners, with behavioral keyboard coverage rather than relying on source assertions or assuming the proposed metadata changes are sufficient.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Actual Up/Down navigation and access to message actions still require Windows UI Automation and NVDA validation; naming containers and enabling tab stops alone may not satisfy the full keyboard contract.

    Codex review notes: model internal, reasoning medium; reviewed against a4dd026cc5f8.

    Label changes

    Label changes:

    • add P1: The reported installed build prevents NVDA users from reading the conversation message by message, impairing a primary agent workflow.
    • add impact:other: The concrete impact is screen-reader accessibility of chat content and tool activity, rather than message delivery or stored session integrity.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P1: The reported installed build prevents NVDA users from reading the conversation message by message, impairing a primary agent workflow.
    • impact:other: The concrete impact is screen-reader accessibility of chat content and tool activity, rather than message delivery or stored session integrity.
    Evidence reviewed

    Acceptance criteria:

    • $env:OPENCLAW_REPO_ROOT = (Get-Location).Path
    • ./build.ps1
    • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
    • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
    • dotnet build tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 31, 2026, 10:12 AM ET / 14:12 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1clawsweeper:fix-shape-clearclawsweeper:queueable-fixclawsweeper:source-reproimpact:otherissue-rating: 🦞 diamond lobsterno-stale

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions