Skip to content

🎨 Palette: Add dynamic aria-labels to icon-only buttons#53

Draft
AashishH15 wants to merge 1 commit into
mainfrom
jules-ux-aria-labels-17351372608077249933
Draft

🎨 Palette: Add dynamic aria-labels to icon-only buttons#53
AashishH15 wants to merge 1 commit into
mainfrom
jules-ux-aria-labels-17351372608077249933

Conversation

@AashishH15

Copy link
Copy Markdown
Member

💡 What: Added aria-labels to the edit (✏️), delete (🗑️), and freeze (❄️) icon-only buttons in SpatialWorkspace.tsx, NodeEditor.tsx, and NodeEditorExpanded.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

@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

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.

Suggested change
aria-label={`Edit ${vault.name}`}
aria-label={`Edit ${getPrivacyDisplayLabel(vault.name, vaultEffectiveTier, isRedactedUnlocked)}`}

Comment on lines +1463 to +1467
aria-label={
deleteArmedId === vault.id
? `Confirm delete ${vault.name}`
: `Delete ${vault.name}`
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

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.

Suggested change
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}`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

To prevent potential privacy leaks of redacted node titles, use the privacy-safe display label helper getPrivacyDisplayLabel for the aria-label.

Suggested change
aria-label={`Edit ${node.title}`}
aria-label={`Edit ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}`}

Comment on lines +1596 to +1600
aria-label={
deleteArmedId === node.id
? `Confirm delete ${node.title}`
: `Delete ${node.title}`
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

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.

Suggested change
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}`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

To prevent potential privacy leaks of redacted subvault names, use the privacy-safe display label helper getPrivacyDisplayLabel for the aria-label.

Suggested change
aria-label={`Edit ${subvault.name}`}
aria-label={`Edit ${getPrivacyDisplayLabel(subvault.name, subvaultEffectiveTier, isRedactedUnlocked)}`}

Comment on lines +1684 to +1688
aria-label={
deleteArmedId === subvault.id
? `Confirm delete ${subvault.name}`
: `Delete ${subvault.name}`
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

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.

Suggested change
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}`}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

To prevent potential privacy leaks of redacted node titles, use the privacy-safe display label helper getPrivacyDisplayLabel for the aria-label.

Suggested change
aria-label={`Edit ${node.title}`}
aria-label={`Edit ${getPrivacyDisplayLabel(node.title, nodeEffectiveTier, isRedactedUnlocked)}`}

Comment on lines +1786 to +1790
aria-label={
deleteArmedId === node.id
? `Confirm delete ${node.title}`
: `Delete ${node.title}`
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

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.

Suggested change
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)}`
}

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.

1 participant