Skip to content

Commit 64d3a67

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(a11y): name remaining icon-only product buttons
1 parent 42e26bf commit 64d3a67

30 files changed

Lines changed: 108 additions & 9 deletions

File tree

‎apps/sim/app/(interfaces)/chat/components/input/input.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ export const ChatInput: React.FC<{
222222
<Tooltip.Root>
223223
<Tooltip.Trigger asChild>
224224
<Button
225+
aria-label='Attach files'
225226
variant='quiet'
226227
onClick={() => fileInputRef.current?.click()}
227228
disabled={isStreaming || attachedFiles.length >= 15}

‎apps/sim/app/(interfaces)/chat/components/message/components/file-download.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export function ChatFileDownloadAll({ files }: ChatFileDownloadAllProps) {
250250
return (
251251
<div className='flex flex-col items-start gap-2'>
252252
<Button
253+
aria-label='Download all files'
253254
variant='ghost-secondary'
254255
onClick={handleDownloadAll}
255256
disabled={isDownloading}

‎apps/sim/app/(interfaces)/chat/components/message/message.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ export const ClientChatMessage = memo(function ClientChatMessage({
272272
<Tooltip.Root>
273273
<Tooltip.Trigger asChild>
274274
<Button
275+
aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'}
275276
variant='ghost-secondary'
276277
className='p-0'
277278
onClick={() => {

‎apps/sim/app/playground/page.tsx‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ export default function PlaygroundPage() {
168168
<div className='absolute top-8 left-8 flex items-center gap-2'>
169169
<Tooltip.Root>
170170
<Tooltip.Trigger asChild>
171-
<Button variant='ghost' onClick={() => router.back()} className='size-8 p-0'>
171+
<Button
172+
aria-label='Go back'
173+
variant='ghost'
174+
onClick={() => router.back()}
175+
className='size-8 p-0'
176+
>
172177
<ArrowLeft className='size-4' />
173178
</Button>
174179
</Tooltip.Trigger>
@@ -178,7 +183,12 @@ export default function PlaygroundPage() {
178183
<div className='absolute top-8 right-8'>
179184
<Tooltip.Root>
180185
<Tooltip.Trigger asChild>
181-
<Button variant='default' onClick={toggleDarkMode} className='size-8 p-0'>
186+
<Button
187+
aria-label={isDarkMode ? 'Light mode' : 'Dark mode'}
188+
variant='default'
189+
onClick={toggleDarkMode}
190+
className='size-8 p-0'
191+
>
182192
{isDarkMode ? <Sun className='size-4' /> : <Moon className='size-4' />}
183193
</Button>
184194
</Tooltip.Trigger>

‎apps/sim/app/workspace/[workspaceId]/components/resource/resource.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ const Pagination = memo(function Pagination({
512512
<div className='flex items-center justify-center border-[var(--border)] border-t bg-[var(--bg)] px-4 py-2.5'>
513513
<div className='flex items-center gap-1'>
514514
<Button
515+
aria-label='Previous page'
515516
variant='ghost'
516517
onClick={() => onPageChange(currentPage - 1)}
517518
disabled={currentPage <= 1}
@@ -548,6 +549,7 @@ const Pagination = memo(function Pagination({
548549
})}
549550
</div>
550551
<Button
552+
aria-label='Next page'
551553
variant='ghost'
552554
onClick={() => onPageChange(currentPage + 1)}
553555
disabled={currentPage >= totalPages}

‎apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export function QueuedMessages({
121121
<Tooltip.Root>
122122
<Tooltip.Trigger asChild>
123123
<button
124+
aria-label='Cancel edit'
124125
type='button'
125126
onClick={(e) => {
126127
e.stopPropagation()
@@ -140,6 +141,7 @@ export function QueuedMessages({
140141
<Tooltip.Root>
141142
<Tooltip.Trigger asChild>
142143
<button
144+
aria-label={isDispatching ? 'Sending now' : 'Edit queued message'}
143145
type='button'
144146
disabled={isDispatching}
145147
onClick={(e) => {
@@ -159,6 +161,7 @@ export function QueuedMessages({
159161
<Tooltip.Root>
160162
<Tooltip.Trigger asChild>
161163
<button
164+
aria-label='Send now'
162165
type='button'
163166
disabled={isDispatching}
164167
onClick={(e) => {
@@ -178,6 +181,7 @@ export function QueuedMessages({
178181
<Tooltip.Root>
179182
<Tooltip.Trigger asChild>
180183
<button
184+
aria-label='Remove from queue'
181185
type='button'
182186
onClick={(e) => {
183187
e.stopPropagation()

‎apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ export function DocumentTagsModal({
407407
</span>
408408
<div className='flex shrink-0 items-center gap-1'>
409409
<Button
410+
aria-label='Remove tag'
410411
variant='ghost'
411412
onClick={(e) => {
412413
e.stopPropagation()

‎apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export function AddDocumentsModal({
203203
<>
204204
{isFailed && (
205205
<Button
206+
aria-label='Retry upload'
206207
type='button'
207208
variant='ghost'
208209
className='size-4 p-0'
@@ -213,6 +214,7 @@ export function AddDocumentsModal({
213214
</Button>
214215
)}
215216
<Button
217+
aria-label='Remove file'
216218
type='button'
217219
variant='ghost'
218220
className='size-4 p-0'

‎apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ export function BaseTagsModal({ open, onOpenChange, knowledgeBaseId }: BaseTagsM
293293
</span>
294294
<div className='flex shrink-0 items-center gap-1'>
295295
<Button
296+
aria-label='Delete Tag'
296297
variant='ghost'
297298
onClick={(e) => {
298299
e.stopPropagation()

‎apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ export const CreateBaseModal = memo(function CreateBaseModal({
550550
<Loader className='size-4 text-[var(--text-muted)]' animate />
551551
) : (
552552
<Button
553+
aria-label='Remove file'
553554
type='button'
554555
variant='ghost'
555556
className='size-4 p-0'

0 commit comments

Comments
 (0)