Skip to content

A11y: tool-output body is outside the header Button's automation subtree #590

Closed

Description

@RBrid

Context

Follow-up from PR-in-flight on branch user/rbrid/ChatSelectionLoss1 (commit fbfffe5), which fixes two chat-bubble bugs in the tray's tool-output cards:

  1. Tool-output Inlines vanishing on hover-out (memoized via ConditionalWeakTable)
  2. Tool panel collapsing on text selection inside the body (restructured into a header-only Button with the body as a sibling)

See src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs lines ~1639-1685.

The a11y concern

The header-only Button restructure means the expanded body content sits outside the Button's automation subtree. Narrator (and other screen readers) reading the header will not naturally announce the body content — users will hear the title/summary but miss the actual tool output unless they navigate further.

Flagged as HIGH severity, ~60% confidence in the Hanselman dual-model review of the original fix. Deferred to keep the bug-fix PR focused.

Suggested fix

Wire the body's automation relationship to the header so screen readers treat them as a unit. Options:

  • AutomationProperties.SetLabeledBy(bodyElement, headerButton)
  • Or set AutomationProperties.Name on the body summarizing the tool output
  • Or wrap header+body in an Expander-like control that already exposes the right automation pattern (trade-off: would undo some of the manual chrome work)

Acceptance

  • Narrator on the expanded tool card announces both header and body content in a coherent reading order
  • No regression to the click-doesn't-collapse fix from fbfffe5

References

  • Original fix: branch user/rbrid/ChatSelectionLoss1 (commit fbfffe5, RBrid fork)
  • File: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs lines ~1639-1685

Activity

  1. clawsweeper commented on May 29, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 29, 2026, 5:34 PM ET / 21:34 UTC.

    Summary
    Keep open. Current main does not have the requested tool-output accessibility wiring; source inspection found no AutomationProperties.LabeledBy or equivalent body name in the chat timeline, and a header-only TaskList body-sibling path still exists even though the exact in-flight branch cited by the report is not present locally.

    Reproducibility: no. high-confidence runtime reproduction yet. Source inspection shows a header-only TaskList path with the body as a sibling and no automation relationship, but I did not run Narrator or inspect the in-flight branch commit directly.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    A focused repair is plausible in the tray chat timeline, but the worker should keep the change to automation metadata and require Windows Narrator proof before merge.

    Review details

    Best possible solution:

    Add a narrow WinUI automation relationship or explicit body automation name for expanded tool-output content that sits outside a header Button, preserving the header-only click target and selectable output body.

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

    No high-confidence runtime reproduction yet. Source inspection shows a header-only TaskList path with the body as a sibling and no automation relationship, but I did not run Narrator or inspect the in-flight branch commit directly.

    Is this the best way to solve the issue?

    Yes, the suggested automation wiring is the narrowest maintainable fix. It should avoid replacing the control structure wholesale and should preserve the text-selection/click behavior that motivated the header-only split.

    AGENTS.md: found, but no applicable review policy affected this item.

    Remaining risk / open question:

    • The cited branch commit fbfffe5 is not present in the local refs I could inspect, so current-main evidence only proves a related source gap, not the exact branch state described in the issue.
    • Narrator/UIA behavior still needs a Windows runtime smoke test; source inspection can identify missing automation wiring but cannot prove the final reading order.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 64b650cb3313.

    Label changes

    Label changes:

    • add P2: Screen reader users may miss expanded tool output in a bounded tray chat surface, but this is not an emergency or core runtime outage.
    • add impact:other: The issue is about accessibility of tool-output cards, which is meaningful maintainer-visible impact outside the specific owned impact categories.
    • add issue-rating: 🐚 platinum hermit: Current issue advisory state selects this label.
    • add clawsweeper:needs-live-repro: Current issue advisory state selects this label.

    Label justifications:

    • P2: Screen reader users may miss expanded tool output in a bounded tray chat surface, but this is not an emergency or core runtime outage.
    • impact:other: The issue is about accessibility of tool-output cards, which is meaningful maintainer-visible impact outside the specific owned impact categories.
    Evidence reviewed

    Acceptance criteria:

    • ./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
    • Manual Windows Narrator smoke: expanded tool card announces header and body content in order and selecting body text does not collapse the card.

    What I checked:

    Likely related people:

    • RBrid: Commit bf21e7b made a large recent change to OpenClawChatTimeline.cs, including native chat UI fixes and selection-related behavior adjacent to this report. (role: recent chat timeline contributor; confidence: medium; commits: bf21e7b216aa, 0a164fc111b2; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs)
    • Scott Hanselman: Commit 50837d7 recently adjusted production tool-call visibility in the same timeline and added the existing tool-call toggle contract test. (role: recent area contributor; confidence: medium; commits: 50837d79ecc2; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs, tests/OpenClaw.Tray.Tests/ChatToolCallsToggleContractTests.cs)
    • the99missedcalls: Commit 6a59218 recently touched chat timeline rendering for thinking-state placement, making them a plausible adjacent reviewer for timeline composition changes. (role: adjacent chat timeline contributor; confidence: low; commits: 6a5921883c86; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatTimeline.cs)
    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.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2
    impact:other
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    on May 29, 2026
  3. added a commit that references this issue on May 30, 2026
    51ca460
  4. github-actions commented on May 30, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    I've investigated this and submitted a fix on branch repo-assist/fix-issue-590-a11y-tool-output-automation. A draft PR is in progress.

    What was found: The CompactSummary tool-burst style (used for multi-step tool calls) creates headerButton as a standalone Button, then adds the expanded body Border as a sibling in a VStack. The body is outside the Button's automation subtree, so Narrator only announces the button's visual text (a FlexRow without an explicit name) and doesn't automatically associate the body content.

    Fix applied (two changes in OpenClawChatTimeline.cs):

    1. Explicit AutomationName on headerButton — builds "{summaryLine}, {stepCountLabel}, {taskStatusText}, expanded/collapsed" and calls .AutomationName(). Narrator now announces e.g. "Searched for files, 3 steps, Done, collapsed, button" when the header is focused.

    2. AutomationName on the expanded body Border — labels the body with "Tool steps for: {summaryLine}" so scan-mode navigation makes the body context clear.

    The Plain style (single-step tools) wraps both header and body inside a single Button already, so it is unaffected.

    Note: I did not use AutomationProperties.SetLabeledBy (which would require resolving both WinUI controls and working around the reactive rendering pipeline). The explicit name approach is simpler and sufficient for the acceptance criteria. A Windows Narrator smoke test is still needed to verify reading order.

    Generated by 🌈 Repo Assist, see workflow run. Learn more.

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a
    
  5. added a commit that references this issue on May 31, 2026
    50d5f85
  6. locked as resolved and limited conversation to collaborators on Jun 10, 2026
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

    P2clawsweeper:needs-live-reproimpact:otherissue-rating: 🐚 platinum hermit

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions