Skip to content

Files list column headers clip narrow text without an ellipsis #19858

Description

@gtritchie

The Files pane's file list column headers clip text that doesn't fit, with no ellipsis. For example, when the Modified column is about 30px wide, its header shows "Mod" cut off, with no ellipsis.

The header th has overflow: hidden; text-overflow: ellipsis; white-space: nowrap, but the text sits inside the header's sort button (the role="button" div in the th), which has overflow: visible. text-overflow applies only to the block whose own content overflows, so it doesn't reach text inside that child block, and the th simply clips it.

Steps to reproduce

  1. Open the Files pane.
  2. Drag the Modified (or Size) column's resize handle to make the column narrow, about 30px.
  3. The header text is cut off with no ellipsis.

Possible fix

Add overflow: hidden; text-overflow: ellipsis to the sort button, and to the text box beside the sort icon when the column is sorted, as EnvironmentObjectGrid.css does for the Environment pane's grid. Then re-check the Size and Modified column resize handles in the sorted state, since the button would clip anything that extends past it.

Found while reviewing #19822, which made these header buttons fill their cells; the clipping predates that change.

Related problems fixed alongside

#19882 also fixes these problems in the same file list:

  • Size and Modified values were cut off the same way as the headers when their column was too narrow. They now end in an ellipsis too.
  • The file icon column's header was blank. It showed only the sort arrow when sorted, and its name, "File type", was visually hidden text. It now shows "Type", the column is wider so the label fits beside the sort arrow, and the icons are centered in it.
  • The list had no accessible name. Screen readers announced it only as a table. It's now named "File Browser".
  • Tab into the list focused the first row's checkbox cell, which is empty in the ".." row. Tab now lands on the first row's name in each folder shown.
  • Enter on a focused name did nothing, so a keyboard user could reach a file or folder but not open it. Enter now does what a click does. When it opens a folder, focus stays in the list.
  • The menu for HTML and data files couldn't be used from the keyboard. These files open a menu of ways to open them, such as "Open in Editor". Opened by Enter, it appeared at the window's top-left and didn't take focus. It now shows below the focused name with focus, and Escape returns focus to the name.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions