Skip to content

Add ARIA labels to all icon-only buttons for screen reader accessibility#2137

Draft
Copilot wants to merge 12 commits intomainfrom
copilot/add-aria-labels-to-icon-buttons
Draft

Add ARIA labels to all icon-only buttons for screen reader accessibility#2137
Copilot wants to merge 12 commits intomainfrom
copilot/add-aria-labels-to-icon-buttons

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

~200 <IconButton> components and several icon-only <button> elements across web/src/ lacked aria-label attributes, making them completely opaque to screen readers.

IconButton components (~130 instances across 50+ files)

Key areas fixed:

  • ImageEditorToolbar — tool buttons (Select, Crop, Draw, Erase, Fill, Text, Rectangle, Ellipse, Line, Arrow), transform (Rotate CCW/CW, Flip H/V), zoom, undo/redo
  • DataTable/TableActions — Add row, Delete/Duplicate rows, Reset sorting, Undo/Redo, Paste, Export CSV, Toggle select/row-numbers, Copy data
  • VerticalToolbar / PanelLeft — all navigation toggle buttons
  • NodeToolButtons / NodeHeader / NodePropertyForm — Run, Bypass, Comment, Duplicate, Info, Add input/output
  • asset_viewer, hugging_face, properties, panels, chat, collections, workspaces — all remaining icon-only IconButtons

Dynamic labels used where toggle state changes meaning:

// Before
<IconButton onClick={handleToggleBypass}>
  <PauseCircleIcon />
</IconButton>

// After
<IconButton
  aria-label={isBypassed ? "Enable node" : "Bypass node"}
  onClick={handleToggleBypass}
>
  <PauseCircleIcon />
</IconButton>

Icon-only <button> elements

  • AssetSearchInput — search mode toggle (dynamic), clear search
  • TabsBar — scroll left/right, create new workflow
  • FindInWorkflowDialog — clear, previous result, next result
  • EditableTitle — remove note
  • TextEditorModal / DataframeEditorModal — find, format, word wrap, editor mode, fullscreen, close
  • DraggableNodeDocumentation — close

Utility component changes

Added an ariaLabel?: string prop to CircularActionButton and ToolbarIconButton to support cases where the tooltip prop is a ReactNode (not a plain string), which previously caused aria-label to resolve to undefined.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add ARIA labels to all icon-only buttons for screen reader accessibility</issue_title>
<issue_description>## Problem
Many IconButton components lack aria-label attributes, making them inaccessible to screen readers. Users who rely on assistive technology cannot understand what these buttons do.

What to do

  1. Search for all <IconButton components in web/src/ that don't have an aria-label prop
  2. Add a descriptive aria-label to each one (e.g. aria-label="Close", aria-label="Delete item", aria-label="Toggle settings")
  3. Also check for <button> elements that only contain an icon (no text) — these need labels too
  4. Ensure interactive elements that look like buttons use <button> or have role="button" + tabIndex={0} + keyboard handlers

Guidelines

  • Labels should be concise and action-oriented
  • Use the button's actual function, not the icon name (e.g. "Close dialog" not "X icon")
  • Don't add labels to buttons that already have visible text</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 10 commits March 14, 2026 21:18
…nButton

Both components had aria-label conditionally derived from tooltip using
`typeof tooltip === "string" ? tooltip : undefined`. When tooltip is a
ReactNode (e.g. ToolbarIconButton with a ShortcutHint), the IconButton
would render without any aria-label.

Add an explicit `ariaLabel?: string` prop to both components so callers
can supply a plain-text accessible label when the tooltip is not a string.
The prop takes precedence over the tooltip-derived value via the nullish
coalescing operator (`ariaLabel ?? ...`).

All other files in ui_primitives already had correct aria-label attributes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…bar and TableActions

- ImageEditorToolbar: added aria-labels to all 10 tool-selection buttons (Select/Pan, Crop, Draw/Paint, Erase, Fill, Text, Rectangle, Ellipse, Line, Arrow), 4 transform buttons (Rotate CCW/CW, Flip H/V), zoom controls (Zoom Out, Zoom In, Reset Zoom), and history buttons (Undo, Redo, Reset to Original)
- TableActions: added aria-labels to all 11 action buttons (Add new row, Delete selected rows, Duplicate selected rows, Reset table sorting, Undo, Redo, Paste from clipboard, Export as CSV, Show Select column, Show Row Numbers, Copy table data to clipboard)
- All aria-labels match the corresponding Tooltip titles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… and PanelLeft

- VerticalToolbar.tsx: add aria-labels to all 9 icon buttons (Inspector,
  Operator, Agent, Workspace, Version History, Workflow Settings,
  Workflow Assets, Logs, Jobs)
- PanelLeft.tsx: add aria-labels to all 6 icon buttons (Workflows, Assets,
  Collections, Model Manager, Workspaces Manager, Toggle Panel)
- All labels match their corresponding Tooltip titles

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- NodeToolButtons: Run from here, Bypass/Enable node, Add/Remove comment,
  Duplicate node, Toggle node info, More actions (dynamic labels based on state)
- NodeHeader: Open link, View logs, Show result, Show inputs
- NodePropertyForm: Add input, Add output

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Model3DViewer: grid, axes, reset camera, screenshot, fullscreen buttons
- PDFViewer: previous/next page, zoom in/out/reset buttons
- DownloadManagerDialog: close button
- DownloadProgress: remove/cancel button (dynamic label from getCloseButtonTooltip)
- ModelPackCard: expand/collapse button (dynamic label based on expanded state)
- ModelTypeSidebar: view on Hugging Face link button

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- PreviewImageGrid: Download, Open in Viewer, Clear selection, Close compare dialog
- ConstantStringNode: Open Editor
- MiniMapNavigator: Node Type Legend, Color Mode Settings
- NodeColorSelector: Select node color
- ImageView: Download, Open in Viewer
- ResultOverlay: View History
- BypassGroupButton: dynamic Enable/Bypass All Nodes
- RunGroupButton: Run Group
- DataframeRenderer: Open in Full View
- FalSchemaLoader, KieSchemaLoader, ReplicateSchemaLoader: Reload Schema

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add descriptive aria-label attributes to all icon-only <IconButton> and
<button> elements across 9 property component files for improved
accessibility:

- DataframeProperty: 'Open editor' on expand button
- ImageListProperty: 'Remove image' on remove button
- ImageSizeProperty: swap, lock/unlock aspect ratio, presets buttons
- JSONProperty: 'Open editor' on expand button
- PropertyDropzone: 'Replace file' on folder-open button
- StringProperty: 'Open editor' on expand button
- ToolsListProperty: per-tool labels, 'Add or remove tools'
- DataframeEditorModal: fullscreen toggle, close editor buttons
- TextEditorModal: find, format, word wrap, toggle editor mode,
  toggle assistant, download, fullscreen, close editor buttons

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add missing aria-label attributes to IconButton and icon-only button
elements to improve screen reader accessibility.

- WorkflowAssistantChat: "Open chat history" on thread list button
- JobItem: dynamic "Expand"/"Collapse" on expand button; "Stop job" on stop button
- SecretsMenu: "Update secret", "Delete secret", "Set secret"
- MiniAppSidePanel: "Open settings" on toggle button
- ModelFiltersBar: dynamic labels for type and size filter buttons
- NodeInfoPanel: "Close" on close button
- ViewportStatusIndicator: "Zoom out", "Zoom in", "Fit view"
- WorkspacesManager: "Save changes", "Cancel edit", "Edit", "Delete"
- ProviderSetupPanel: dynamic "Expand"/"Collapse" on accordion button
- FileBrowserDialog: "Go up" on directory navigation button
- EditorToolbar: "Undo", "Redo", "Find & Replace", "Toggle Word Wrap",
  "Format as Code Block"
- ImageComparer: dynamic "Switch to vertical"/"Switch to horizontal"
- VibeCodingPreview: "View Source", "Open in New Tab"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2026

Deploying nodetool-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: 579b9db
Status: ✅  Deploy successful!
Preview URL: https://7e0e4b0e.nodetool-staging.pages.dev
Branch Preview URL: https://copilot-add-aria-labels-to-i.nodetool-staging.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 14, 2026

Deploying nodetool with  Cloudflare Pages  Cloudflare Pages

Latest commit: 579b9db
Status: ✅  Deploy successful!
Preview URL: https://2bbf9915.nodetool.pages.dev
Branch Preview URL: https://copilot-add-aria-labels-to-i.nodetool.pages.dev

View logs

Copilot AI changed the title [WIP] Add ARIA labels to all icon-only buttons for screen reader accessibility Add ARIA labels to all icon-only buttons for screen reader accessibility Mar 14, 2026
Copilot AI requested a review from georgi March 14, 2026 21:45
Copy link
Collaborator

georgi commented Mar 21, 2026

Review: This PR now conflicts with #2142 (merged), which added aria-label to the same 4 IconButtons in JSONProperty.tsx, StringProperty.tsx, DataframeProperty.tsx, and ConstantStringNode.tsx.

The rest of the changes (~130 additional IconButtons across 50+ files) look good and are much broader in scope. Please rebase on latest main to resolve the conflicts from #2142, then this can move forward.

Copy link
Collaborator

georgi commented Mar 21, 2026

Unable to rebase this branch automatically — it has merge conflicts with main (likely in the files that overlap with the already-merged #2142: JSONProperty.tsx, StringProperty.tsx, DataframeProperty.tsx, ConstantStringNode.tsx). I don't have push access to Copilot-owned branches. @copilot or @georgi please rebase this branch on latest main.

Copy link
Contributor Author

Copilot AI commented Mar 21, 2026

Review: This PR now conflicts with #2142 (merged), which added aria-label to the same 4 IconButtons in JSONProperty.tsx, StringProperty.tsx, DataframeProperty.tsx, and `ConstantStringNod...

Merged origin/main into this branch in commit 579b9dbf. The 4 conflicting files (JSONProperty.tsx, StringProperty.tsx, DataframeProperty.tsx, ConstantStringNode.tsx) both had identical aria-label="Open Editor" additions — resolved by using main's attribute ordering. No functional difference.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ARIA labels to all icon-only buttons for screen reader accessibility

2 participants