-
Notifications
You must be signed in to change notification settings - Fork 0
π¨ Palette: Add missing ARIA labels to chat and editor buttons #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## 2024-06-13 - Initial Setup\n**Learning:** Started logging UX enhancements.\n**Action:** Will log critical a11y/UX learnings here. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| sed -i 's/className="chat-bubble-edit-btn cancel"/className="chat-bubble-edit-btn cancel"\n aria-label="Cancel edit"/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/className="chat-bubble-edit-btn save"/className="chat-bubble-edit-btn save"\n aria-label="Save edit"/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/className="chat-show-more-btn"/className="chat-show-more-btn"\n aria-label={isCollapsed ? "Show more message content" : "Show less message content"}/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/className="chat-action-btn"/className="chat-action-btn"\n aria-label={isCopied ? "Copied" : "Copy message"}/g' ui/components/ChatPanel.tsx | ||
| # Need more precise patching for aria labels based on title props | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| sed -i 's/title="Copy message"/title="Copy message"\n aria-label={isCopied ? "Copied message" : "Copy message"}/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/title="Retry response"/title="Retry response"\n aria-label="Retry response"/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/title="Edit message"/title="Edit message"\n aria-label="Edit message"/g' ui/components/ChatPanel.tsx |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| sed -i 's/className="chat-bubble-edit-btn cancel"/className="chat-bubble-edit-btn cancel"\n aria-label="Cancel edit"/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/className="chat-bubble-edit-btn save"/className="chat-bubble-edit-btn save"\n aria-label="Save edit"/g' ui/components/ChatPanel.tsx | ||
| sed -i 's/className="chat-show-more-btn"/className="chat-show-more-btn"\n aria-label={isCollapsed ? "Show more message content" : "Show less message content"}/g' ui/components/ChatPanel.tsx |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/bin/bash | ||
| sed -i 's/title="Toggle interactive charts render workspace assets"/title="Toggle interactive charts render workspace assets"\n aria-label="Toggle interactive charts"/g' ui/components/NodeEditorDetail.tsx | ||
| sed -i 's/title="Expand editor to full center canvas focus"/title="Expand editor to full center canvas focus"\n aria-label="Expand editor"/g' ui/components/NodeEditorDetail.tsx |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -114,13 +114,15 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| <button | ||||||||||||
| type="button" | ||||||||||||
| className="chat-bubble-edit-btn cancel" | ||||||||||||
| aria-label="Cancel edit" | ||||||||||||
| onClick={onCancelEdit} | ||||||||||||
|
Comment on lines
116
to
118
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The button has visible text "Cancel". Adding
Suggested change
|
||||||||||||
| > | ||||||||||||
| Cancel | ||||||||||||
| </button> | ||||||||||||
| <button | ||||||||||||
| type="button" | ||||||||||||
| className="chat-bubble-edit-btn save" | ||||||||||||
| aria-label="Save edit" | ||||||||||||
| onClick={() => void onSaveEdit(index, editingContent)} | ||||||||||||
|
Comment on lines
124
to
126
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The button has visible text "Save". Adding
Suggested change
|
||||||||||||
| > | ||||||||||||
| Save | ||||||||||||
|
|
@@ -147,6 +149,9 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| <button | ||||||||||||
| type="button" | ||||||||||||
| className="chat-show-more-btn" | ||||||||||||
| aria-label={ | ||||||||||||
| isCollapsed ? "Show more message content" : "Show less message content" | ||||||||||||
| } | ||||||||||||
| onClick={() => setIsCollapsed(!isCollapsed)} | ||||||||||||
| > | ||||||||||||
| {isCollapsed ? "Show more" : "Show less"} | ||||||||||||
|
|
@@ -163,6 +168,7 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| className="chat-action-btn" | ||||||||||||
| onClick={() => onCopyMessage(message.content, message.id)} | ||||||||||||
| title="Copy message" | ||||||||||||
| aria-label={isCopied ? "Copied message" : "Copy message"} | ||||||||||||
|
Comment on lines
170
to
+171
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the message is copied (
Suggested change
|
||||||||||||
| > | ||||||||||||
| {isCopied ? ( | ||||||||||||
| <svg | ||||||||||||
|
|
@@ -198,6 +204,7 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| className="chat-action-btn" | ||||||||||||
| onClick={() => onRetryMessage(index)} | ||||||||||||
| title="Retry response" | ||||||||||||
| aria-label="Retry response" | ||||||||||||
| > | ||||||||||||
| <svg | ||||||||||||
| width="15" | ||||||||||||
|
|
@@ -222,6 +229,7 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| className="chat-action-btn" | ||||||||||||
| onClick={() => onCopyMessage(message.content, message.id)} | ||||||||||||
| title="Copy message" | ||||||||||||
| aria-label={isCopied ? "Copied message" : "Copy message"} | ||||||||||||
|
Comment on lines
231
to
+232
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When the message is copied (
Suggested change
|
||||||||||||
| > | ||||||||||||
| {isCopied ? ( | ||||||||||||
| <svg | ||||||||||||
|
|
@@ -257,6 +265,7 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| className="chat-action-btn" | ||||||||||||
| onClick={() => onStartEdit(message.id, message.content)} | ||||||||||||
| title="Edit message" | ||||||||||||
| aria-label="Edit message" | ||||||||||||
| > | ||||||||||||
| <svg | ||||||||||||
| width="15" | ||||||||||||
|
|
@@ -277,6 +286,7 @@ const ChatMessageBubble = React.memo(function ChatMessageBubble({ | |||||||||||
| className="chat-action-btn" | ||||||||||||
| onClick={() => onRetryMessage(index)} | ||||||||||||
| title="Retry response" | ||||||||||||
| aria-label="Retry response" | ||||||||||||
| > | ||||||||||||
| <svg | ||||||||||||
| width="15" | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -194,6 +194,7 @@ export default function NodeEditorDetail({ | |||||||||||
| className={`charts-toggle-btn ${chartsEnabled ? "active" : ""}`} | ||||||||||||
| onClick={() => setNodeEditorChartsEnabled(!chartsEnabled)} | ||||||||||||
| title="Toggle interactive charts render workspace assets" | ||||||||||||
| aria-label="Toggle interactive charts" | ||||||||||||
| > | ||||||||||||
|
Comment on lines
196
to
198
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The button already has clear, visible text:
Suggested change
|
||||||||||||
| π Charts: {chartsEnabled ? "ON" : "OFF"} | ||||||||||||
| </button> | ||||||||||||
|
|
@@ -203,6 +204,7 @@ export default function NodeEditorDetail({ | |||||||||||
| className="detail-expand-btn" | ||||||||||||
| onClick={onExpand} | ||||||||||||
| title="Expand editor to full center canvas focus" | ||||||||||||
| aria-label="Expand editor" | ||||||||||||
| > | ||||||||||||
|
Comment on lines
206
to
208
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The button has visible text "Focus Canvas". Adding
Suggested change
|
||||||||||||
| <span className="expand-icon">βΆ</span> Focus Canvas | ||||||||||||
| </button> | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These temporary shell scripts (
patch_chatpanel.sh,patch_chatpanel2.sh,patch_chatpanel3.sh,patch_nodeeditor.sh) appear to be automation artifacts used to apply changes to the codebase. They should not be committed to the repository as they pollute the project. Please remove them before merging.