Skip to content

[Bug] Text, Table, Thumbnail, ListItem: cut text and tooltip-only labels can be read on mouse hover only #8938

Open

Description

@duytbp

Description

Several components put text a sighted user cannot otherwise read into a tooltip or title on an element that never takes focus, so the text is reachable by mouse hover only. Keyboard users (and touch users, for title) cannot reveal it. WCAG 2.1.1 (Keyboard) expects the function to be keyboard operable, and the Tooltip pattern assumes a focusable trigger.

  • Text with maxLines: the truncation tooltip anchors to the text element, which is not focusable (Text.tsx:325-334). Text.spec.md already records this under Current-state impact ("Truncation tooltip not reachable by keyboard").
  • Table with textOverflow="truncate": a cut cell renders that same <Text maxLines={1}> (BaseTable.tsx:193-209), so a cut cell value can't be read from the keyboard, and a cut header carries only a native title (BaseTable.tsx:462-465).
  • Table row status: an icon status shows its label only in a Tooltip on a <span role="img"> that takes no focus (useTableRowStatus.tsx:246-258).
  • Thumbnail with label: the tooltip wraps the thumbnail's <div> (Thumbnail.tsx:518-519).
  • ListItem with a string label: the label is cut to one line with an ellipsis and has no tooltip or title at all (Item.tsx:677-684).

The full text stays in the DOM, so a screen reader reads it; the gap is for sighted keyboard and touch users. #5585 covers the same gap for Badge's title.

Expected: where a value is cut, its full text can be revealed from the keyboard, e.g. by a tooltip on the focusable element that contains it (the row or cell in a navigable Table, the ListItem's own control), or by making the truncated element a tab stop only while it is truncated, as #4007 did for Timestamp.

Reproduction

import {Table, Text, pixel} from '@astryxdesign/core';

const rows = [{id: '1', name: 'A supplier name long enough to be cut in this column'}];

export function Repro() {
  return (
    <div style={{width: 240}}>
      <Text maxLines={1}>A sentence long enough to be cut at this width, with more after it.</Text>
      <Table
        data={rows}
        columns={[{key: 'name', header: 'Supplier name for this order', width: pixel(120)}]}
        textOverflow="truncate"
      />
    </div>
  );
}
  1. Hover the cut sentence or the cut cell: the tooltip shows the full text.
  2. Tab through the page: no stop reaches either element, and nothing shows the full text.
  3. The cut header shows its full text only as a native title on hover.

Astryx Version

@astryxdesign/[email protected], still present on main (14fc587)

Environment

Any browser; keyboard-only and touch users.

Activity

  1. duytbp commented on Nov 2, 2026

    @duytbp
    ContributorAuthor

    Another affected case, one that already has a focusable element to key the tooltip on: Link with maxLines. Link renders <Text maxLines> inside the anchor (Link.tsx#L350-L358), so the truncation tooltip anchors to the inner text. Tab focuses the anchor, and the tooltip does not open.

    import {Link} from '@astryxdesign/core';
    
    export function Repro() {
      return (
        <div style={{width: 200}}>
          <button type="button">Before</button>
          <Link href="#report" maxLines={1} style={{maxWidth: '100%', minWidth: 0}}>
            Download the quarterly supplier report for October
          </Link>
        </div>
      );
    }

    (The style makes the link truncate in 0.7.5. #9059 does this on main.)

    1. Focus Before and press Tab. The link takes focus and matches :focus-visible. No tooltip opens.
    2. Hover the link text. The tooltip shows the full text.

    Measured in Chromium 156 with @astryxdesign/[email protected]. The inner Text carries the tooltip's aria-describedby; the anchor carries none.

    #9097 gives a truncated Text a tab stop, but leaves out Text inside a link, which avoids a second stop inside the anchor. Its spec change records this case as a remaining gap: the tooltip opens on hover and touch only. Since the anchor takes focus, the tooltip could use it as its focus trigger.

  2. added
    bug
    component
    on Nov 2, 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

    accessibilityarea:corearea:tablesbugcomponent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions