Skip to content

A whitespace-only tile title survives into accessible names #476

Description

@BorisTyshkevich

Spotted during the #471 review; deliberately not fixed there (it changes title semantics for every consumer, not just the new action).

What

src/dashboard/application/dashboard-viewer-session.ts:550:

const title = (typeof tile.title === 'string' && tile.title) || (query ? queryName(query) : tile.queryId) || tile.id;

A non-empty but whitespace-only tile.title (e.g. " "") is truthy, so it wins the ||chain unfiltered — unlikequeryName()on the line above, which trims before falling back toUntitled. dashboardTileV1.titlecarries nominLengthinschemas/`, so such a document is schema-legal.

ts.title then composes accessible names directly:

A screen reader announces "Open, — , in Workbench". The visible .dash-tile-name is equally blank, so the tile also loses its heading.

Why it is deferred, not urgent

No shipped UI writes tile.title today — it is reachable only through a hand-authored or imported document. It becomes user-reachable the moment a rename-tile affordance ships (#429 / #463 territory).

Fix

Trim before the fallback chain, so a whitespace-only title behaves like an absent one:

const authored = typeof tile.title === 'string' ? tile.title.trim() : '';
const title = authored || (query ? queryName(query) : tile.queryId) || tile.id;

That is a behavior change for existing documents carrying such a title (they would start showing the query name), which is why it wants its own change and a test rather than riding along in #471.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inboxFiled mid-task; not yet triaged into the roadmap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions