🎨 Palette: Add dynamic aria-labels to icon-only buttons#53
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request introduces dynamic accessibility labels (aria-label) to interactive elements across the NodeEditor, NodeEditorExpanded, and SpatialWorkspace components to ensure screen readers accurately reflect the visual UI state. The reviewer highlighted a security and privacy concern in SpatialWorkspace.tsx where raw names and titles (such as vault.name, node.title, and subvault.name) are directly exposed in the aria-label attributes. To prevent potential information disclosure of redacted or locked items, the reviewer suggests wrapping these values with the getPrivacyDisplayLabel helper function.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| setEditingItemType("vault"); | ||
| setEditValue(vault.name); | ||
| }} | ||
| aria-label={`Edit ${vault.name}`} |
There was a problem hiding this comment.
The aria-label directly exposes vault.name to screen readers. To prevent potential privacy leaks of redacted vault names, use the privacy-safe display label helper getPrivacyDisplayLabel.
| aria-label={`Edit ${vault.name}`} | |
| aria-label={`Edit ${getPrivacyDisplayLabel(vault.name, vaultEffectiveTier, isRedactedUnlocked)}`} |
| aria-label={ | ||
| deleteArmedId === vault.id | ||
| ? `Confirm delete ${vault.name}` | ||
| : `Delete ${vault.name}` | ||
| } |
There was a problem hiding this comment.
The delete button is rendered for all vaults, including those that are redacted and locked. Directly using vault.name in the aria-label exposes the confidential vault name to screen readers. Use getPrivacyDisplayLabel to ensure the name is properly redacted when locked.
| aria-label={ | |
| deleteArmedId === vault.id | |
| ? `Confirm delete ${vault.name}` | |
| : `Delete ${vault.name}` | |
| } | |
| aria-label={ | |
| deleteArmedId === vault.id | |
| ? `Confirm delete ${getPrivacyDisplayLabel(vault.name, vaultEffectiveTier, isRedactedUnlocked)}` | |
| : `Delete ${getPrivacyDisplayLabel(vault.name, vaultEffectiveTier, isRedactedUnlocked)}` | |
| } |
| setEditingItemType("node"); | ||
| setEditValue(node.title); | ||
| }} | ||
| aria-label={`Edit ${node.title}`} |
There was a problem hiding this comment.
| aria-label={ | ||
| deleteArmedId === node.id | ||
| ? `Confirm delete ${node.title}` | ||
| : `Delete ${node.title}` | ||
| } |
There was a problem hiding this comment.
Directly using node.title in the aria-label can expose redacted node titles to screen readers. Use getPrivacyDisplayLabel to ensure the title is properly redacted when locked.
| aria-label={ | |
| deleteArmedId === node.id | |
| ? `Confirm delete ${node.title}` | |
| : `Delete ${node.title}` | |
| } | |
| aria-label={ | |
| deleteArmedId === node.id | |
| ? `Confirm delete ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}` | |
| : `Delete ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}` | |
| } |
| setEditingItemType("subvault"); | ||
| setEditValue(subvault.name); | ||
| }} | ||
| aria-label={`Edit ${subvault.name}`} |
There was a problem hiding this comment.
To prevent potential privacy leaks of redacted subvault names, use the privacy-safe display label helper getPrivacyDisplayLabel for the aria-label.
| aria-label={`Edit ${subvault.name}`} | |
| aria-label={`Edit ${getPrivacyDisplayLabel(subvault.name, subvaultEffectiveTier, isRedactedUnlocked)}`} |
| aria-label={ | ||
| deleteArmedId === subvault.id | ||
| ? `Confirm delete ${subvault.name}` | ||
| : `Delete ${subvault.name}` | ||
| } |
There was a problem hiding this comment.
Directly using subvault.name in the aria-label can expose redacted subvault names to screen readers. Use getPrivacyDisplayLabel to ensure the name is properly redacted when locked.
| aria-label={ | |
| deleteArmedId === subvault.id | |
| ? `Confirm delete ${subvault.name}` | |
| : `Delete ${subvault.name}` | |
| } | |
| aria-label={ | |
| deleteArmedId === subvault.id | |
| ? `Confirm delete ${getPrivacyDisplayLabel(subvault.name, subvaultEffectiveTier, isRedactedUnlocked)}` | |
| : `Delete ${getPrivacyDisplayLabel(subvault.name, subvaultEffectiveTier, isRedactedUnlocked)}` | |
| } |
| setEditingItemType("node"); | ||
| setEditValue(node.title); | ||
| }} | ||
| aria-label={`Edit ${node.title}`} |
There was a problem hiding this comment.
| aria-label={ | ||
| deleteArmedId === node.id | ||
| ? `Confirm delete ${node.title}` | ||
| : `Delete ${node.title}` | ||
| } |
There was a problem hiding this comment.
Directly using node.title in the aria-label can expose redacted node titles to screen readers. Use getPrivacyDisplayLabel to ensure the title is properly redacted when locked.
| aria-label={ | |
| deleteArmedId === node.id | |
| ? `Confirm delete ${node.title}` | |
| : `Delete ${node.title}` | |
| } | |
| aria-label={ | |
| deleteArmedId === node.id | |
| ? `Confirm delete ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}` | |
| : `Delete ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}` | |
| } |
💡 What: Added
aria-labels to the edit (✏️), delete (🗑️), and freeze (❄️) icon-only buttons inSpatialWorkspace.tsx,NodeEditor.tsx, andNodeEditorExpanded.tsx.🎯 Why: These buttons previously had no text description, making them inaccessible to screen readers.
♿ Accessibility: The
aria-labels dynamically change based on the state of the component (e.g. they say "Confirm delete [item]" instead of "Delete [item]" when armed).PR created automatically by Jules for task 17351372608077249933 started by @AashishH15