@ticatec/uniface-element 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +273 -1
  2. package/README_CN.md +341 -0
  3. package/dist/common/MouseClickHandler.d.ts +1 -1
  4. package/dist/dialog/CommonDialog.svelte +6 -3
  5. package/dist/dialog/CommonDialog.svelte.d.ts +2 -1
  6. package/dist/dialog/Dialog.svelte +36 -10
  7. package/dist/dialog/Dialog.svelte.d.ts +4 -3
  8. package/dist/dialog/DialogBoard.svelte +11 -8
  9. package/dist/dialog/DialogWrapper.svelte +10 -0
  10. package/dist/dialog/DialogWrapper.svelte.d.ts +22 -0
  11. package/dist/dialog/Dialogs.js +1 -1
  12. package/dist/dialog/ModalResult.d.ts +5 -0
  13. package/dist/dialog/ModalResult.js +5 -0
  14. package/docs/buttons/cn/ActionBar.md +459 -0
  15. package/docs/buttons/cn/Button.md +228 -0
  16. package/docs/buttons/cn/IconButton.md +294 -0
  17. package/docs/buttons/cn/README.md +600 -0
  18. package/docs/buttons/cn/TextButton.md +163 -0
  19. package/docs/buttons/en/ActionBar.md +459 -0
  20. package/docs/buttons/en/Button.md +228 -0
  21. package/docs/buttons/en/IconButton.md +294 -0
  22. package/docs/buttons/en/README.md +600 -0
  23. package/docs/buttons/en/TextButton.md +163 -0
  24. package/docs/containers/cn/accordion.md +622 -0
  25. package/docs/containers/cn/box.md +445 -0
  26. package/docs/containers/cn/card.md +404 -0
  27. package/docs/containers/cn/page.md +576 -0
  28. package/docs/containers/cn/tabs.md +686 -0
  29. package/docs/containers/en/accordion.md +622 -0
  30. package/docs/containers/en/box.md +445 -0
  31. package/docs/containers/en/card.md +404 -0
  32. package/docs/containers/en/page.md +576 -0
  33. package/docs/containers/en/tabs.md +686 -0
  34. package/docs/data-display/cn/concise-data-table.md +731 -0
  35. package/docs/data-display/cn/listbox.md +786 -0
  36. package/docs/data-display/cn/treeview.md +863 -0
  37. package/docs/data-display/en/concise-data-table.md +732 -0
  38. package/docs/data-display/en/listbox.md +786 -0
  39. package/docs/data-display/en/treeview.md +863 -0
  40. package/docs/data-table/cn/README.md +596 -0
  41. package/docs/data-table/en/README.md +596 -0
  42. package/docs/dialog/cn/README.md +767 -0
  43. package/docs/dialog/en/README.md +767 -0
  44. package/docs/form/cn/README.md +847 -0
  45. package/docs/form/en/README.md +847 -0
  46. package/docs/form-components/cn/README.md +495 -0
  47. package/docs/form-components/cn/attachmentfilesfield.md +757 -0
  48. package/docs/form-components/cn/cascade-options-select.md +374 -0
  49. package/docs/form-components/cn/checkbox.md +58 -0
  50. package/docs/form-components/cn/date-picker.md +138 -0
  51. package/docs/form-components/cn/datetime-picker.md +228 -0
  52. package/docs/form-components/cn/group-checkbox.md +405 -0
  53. package/docs/form-components/cn/group-radiobox.md +525 -0
  54. package/docs/form-components/cn/imagefilesfield.md +651 -0
  55. package/docs/form-components/cn/input-options-select.md +250 -0
  56. package/docs/form-components/cn/lookup-editor.md +406 -0
  57. package/docs/form-components/cn/memoeditor.md +409 -0
  58. package/docs/form-components/cn/number-editor.md +261 -0
  59. package/docs/form-components/cn/options-multi-select.md +177 -0
  60. package/docs/form-components/cn/options-select.md +83 -0
  61. package/docs/form-components/cn/passwordeditor.md +538 -0
  62. package/docs/form-components/cn/prompts-text-editor.md +241 -0
  63. package/docs/form-components/cn/radiobutton.md +84 -0
  64. package/docs/form-components/cn/switch.md +178 -0
  65. package/docs/form-components/cn/text-editor.md +142 -0
  66. package/docs/form-components/cn/time-editor.md +159 -0
  67. package/docs/form-components/cn/unit-number-editor.md +164 -0
  68. package/docs/form-components/en/README.md +463 -0
  69. package/docs/form-components/en/attachmentfilesfield.md +757 -0
  70. package/docs/form-components/en/cascade-options-select.md +358 -0
  71. package/docs/form-components/en/checkbox.md +59 -0
  72. package/docs/form-components/en/date-picker.md +138 -0
  73. package/docs/form-components/en/datetime-picker.md +228 -0
  74. package/docs/form-components/en/group-checkbox.md +395 -0
  75. package/docs/form-components/en/group-radiobox.md +498 -0
  76. package/docs/form-components/en/imagefilesfield.md +651 -0
  77. package/docs/form-components/en/input-options-select.md +239 -0
  78. package/docs/form-components/en/lookup-editor.md +389 -0
  79. package/docs/form-components/en/memoeditor.md +409 -0
  80. package/docs/form-components/en/number-editor.md +249 -0
  81. package/docs/form-components/en/options-multi-select.md +177 -0
  82. package/docs/form-components/en/options-select.md +83 -0
  83. package/docs/form-components/en/passwordeditor.md +538 -0
  84. package/docs/form-components/en/prompts-text-editor.md +241 -0
  85. package/docs/form-components/en/radiobutton.md +84 -0
  86. package/docs/form-components/en/switch.md +180 -0
  87. package/docs/form-components/en/text-editor.md +142 -0
  88. package/docs/form-components/en/time-editor.md +159 -0
  89. package/docs/form-components/en/unit-number-editor.md +164 -0
  90. package/docs/form-layout/cn/criteria-field.md +652 -0
  91. package/docs/form-layout/cn/flex-form.md +454 -0
  92. package/docs/form-layout/cn/flex-row-form.md +542 -0
  93. package/docs/form-layout/cn/form-field.md +923 -0
  94. package/docs/form-layout/cn/grid-form.md +676 -0
  95. package/docs/form-layout/en/criteria-field.md +652 -0
  96. package/docs/form-layout/en/flex-form.md +454 -0
  97. package/docs/form-layout/en/flex-row-form.md +542 -0
  98. package/docs/form-layout/en/form-field.md +923 -0
  99. package/docs/form-layout/en/grid-form.md +676 -0
  100. package/docs/global/cn/README.md +534 -0
  101. package/docs/global/en/README.md +534 -0
  102. package/docs/layout/cn/classiclayout.md +460 -0
  103. package/docs/layout/cn/headerlayout.md +524 -0
  104. package/docs/layout/cn/sidebarlayout.md +263 -0
  105. package/docs/layout/en/classiclayout.md +951 -0
  106. package/docs/layout/en/headerlayout.md +524 -0
  107. package/docs/layout/en/sidebarlayout.md +262 -0
  108. package/docs/misc/cn/README.md +1217 -0
  109. package/docs/misc/en/README.md +1217 -0
  110. package/docs/navigation/cn/breadcrumb.md +291 -0
  111. package/docs/navigation/cn/navigator.md +322 -0
  112. package/docs/navigation/cn/navigatormenu.md +512 -0
  113. package/docs/navigation/cn/progressbar.md +199 -0
  114. package/docs/navigation/cn/progressstepbar.md +299 -0
  115. package/docs/navigation/en/breadcrumb.md +291 -0
  116. package/docs/navigation/en/navigator.md +322 -0
  117. package/docs/navigation/en/navigatormenu.md +512 -0
  118. package/docs/navigation/en/progressbar.md +199 -0
  119. package/docs/navigation/en/progressstepbar.md +299 -0
  120. package/docs/search-filters/cn/daterange.md +1156 -0
  121. package/docs/search-filters/cn/numberrange.md +688 -0
  122. package/docs/search-filters/cn/searchbox.md +1582 -0
  123. package/docs/search-filters/en/daterange.md +1156 -0
  124. package/docs/search-filters/en/numberrange.md +688 -0
  125. package/docs/search-filters/en/searchbox.md +1582 -0
  126. package/package.json +38 -5
@@ -0,0 +1,600 @@
1
+ # Button Component System
2
+
3
+ The Uniface Element Button system provides a comprehensive set of interactive button components for Svelte applications. It includes standard buttons, text buttons, icon buttons, and a flexible action bar component for organizing multiple actions.
4
+
5
+ ## Component Overview
6
+
7
+ The button system consists of four main components, each with specific purposes and design goals:
8
+
9
+ ### [Button Component](./Button.md)
10
+ Full-featured button component with icon and label support, suitable for most interaction scenarios.
11
+
12
+ **Features:**
13
+ - Supports icon + text labels
14
+ - Multiple size and style variants
15
+ - Complete theme support
16
+ - Async operation handling
17
+
18
+ **Use Cases:** Primary actions, form submissions, dialog confirmations
19
+
20
+ ### [TextButton Component](./TextButton.md)
21
+ Lightweight component optimized for text-only buttons with minimal styling.
22
+
23
+ **Features:**
24
+ - Text-only display
25
+ - Minimal visual styling
26
+ - Fast loading and rendering
27
+ - Support for custom content slots
28
+
29
+ **Use Cases:** Navigation links, inline actions, dialog cancel buttons
30
+
31
+ ### [IconButton Component](./IconButton.md)
32
+ Icon-only button component designed for compact interfaces.
33
+
34
+ **Features:**
35
+ - Icon-only display
36
+ - Compact space usage
37
+ - Multiple icon library support
38
+ - Adaptive sizing
39
+
40
+ **Use Cases:** Toolbars, data table actions, card actions
41
+
42
+ ### [ActionBar Component](./ActionBar.md)
43
+ Container component for organizing and managing multiple button actions.
44
+
45
+ **Features:**
46
+ - Unified button layout management
47
+ - Automatic spacing and alignment
48
+ - Separator support
49
+ - Responsive layout
50
+
51
+ **Use Cases:** Form action bars, dialog footers, toolbar layouts
52
+
53
+ ## Architecture Diagram
54
+
55
+ ```mermaid
56
+ graph TD
57
+ A[ActionBar Container] --> B[Button Components]
58
+ B --> C[Button Standard]
59
+ B --> D[TextButton Text-only]
60
+ B --> E[IconButton Icon-only]
61
+ F[ButtonAction Config] --> A
62
+ G[ButtonType Styling] --> B
63
+ H[MouseClickHandler Events] --> B
64
+ ```
65
+
66
+ ## Quick Start
67
+
68
+ ### Installation and Import
69
+
70
+ ```typescript
71
+ // Import required components
72
+ import Button from '@ticatec/uniface-element/Button';
73
+ import TextButton from '@ticatec/uniface-element/TextButton';
74
+ import IconButton from '@ticatec/uniface-element/IconButton';
75
+ import ActionBar from '@ticatec/uniface-element/ActionBar';
76
+ import type { ButtonActions } from '@ticatec/uniface-element';
77
+ ```
78
+
79
+ ### Basic Examples
80
+
81
+ ```svelte
82
+ <script lang="ts">
83
+ import Button from '@ticatec/uniface-element/Button';
84
+ import TextButton from '@ticatec/uniface-element/TextButton';
85
+ import IconButton from '@ticatec/uniface-element/IconButton';
86
+ import ActionBar from '@ticatec/uniface-element/ActionBar';
87
+ import type { ButtonActions } from '@ticatec/uniface-element';
88
+
89
+ const handleSave = async () => {
90
+ // Save operation
91
+ };
92
+
93
+ const actions: ButtonActions = [
94
+ { label: "Cancel", type: "secondary", handler: async () => {} },
95
+ { label: "Save", type: "primary", handler: handleSave }
96
+ ];
97
+ </script>
98
+
99
+ <!-- Standard button -->
100
+ <Button label="Save" type="primary" icon="icon_google_save" onClick={handleSave} />
101
+
102
+ <!-- Text button -->
103
+ <TextButton label="Cancel" type="secondary" onClick={async () => {}} />
104
+
105
+ <!-- Icon button -->
106
+ <IconButton icon="icon_google_edit" type="primary" onClick={async () => {}} />
107
+
108
+ <!-- Action bar -->
109
+ <ActionBar buttons={actions} />
110
+ ```
111
+
112
+ ## Button Types & Styling
113
+
114
+ ### ButtonType Options
115
+
116
+ ```typescript
117
+ type ButtonType = 'default' | 'primary' | 'secondary' | 'third' | 'forth';
118
+ ```
119
+
120
+ ### Visual Appearance
121
+
122
+ - **default**: Standard neutral button appearance
123
+ - **primary**: Emphasizes primary actions (typically blue)
124
+ - **secondary**: Secondary actions button (typically gray)
125
+ - **third**: Alternative style (typically for warnings/caution)
126
+ - **forth**: Additional style variant
127
+
128
+ ### Size Variants
129
+
130
+ - **big**: Large button size for prominent actions
131
+ - **medium**: Standard button size for most use cases
132
+ - **mini**: Small button size for compact interfaces
133
+
134
+ ### Style Variants (Button only)
135
+
136
+ - **plain**: Minimalist style variant
137
+ - **round**: Rounded corner variant
138
+ - **'' (empty string)**: Standard styling
139
+
140
+ ## API Reference
141
+
142
+ ### ButtonAction Interface
143
+
144
+ ```typescript
145
+ interface ButtonAction {
146
+ /** Button label text */
147
+ label: string;
148
+
149
+ /** Whether button is disabled */
150
+ disabled?: boolean;
151
+
152
+ /** Icon class (e.g., Google Material Icons) */
153
+ icon?: string;
154
+
155
+ /** Button type for styling */
156
+ type?: ButtonType;
157
+
158
+ /** Click event handler */
159
+ handler?: MouseClickHandler;
160
+ }
161
+
162
+ type ButtonActions = Array<ButtonAction | null>;
163
+ ```
164
+
165
+ ### MouseClickHandler Type
166
+
167
+ ```typescript
168
+ type MouseClickHandler = (event: MouseEvent) => Promise<void>;
169
+ ```
170
+
171
+ ### Click Throttling
172
+
173
+ All button components implement automatic click throttling with a 500ms cooldown to prevent accidental double-clicks and ensure proper async operation handling.
174
+
175
+ ### Icon Usage
176
+
177
+ Components use `@ticatec/uniface-google-material-icons` as the icon library. Simply pass the icon class name:
178
+
179
+ ```svelte
180
+ <!-- Common Material Icons -->
181
+ <Button icon="icon_google_save" label="Save" />
182
+ <Button icon="icon_google_edit" label="Edit" />
183
+ <Button icon="icon_google_delete" label="Delete" />
184
+ <Button icon="icon_google_add" label="Add" />
185
+ <Button icon="icon_google_remove" label="Remove" />
186
+ <Button icon="icon_google_search" label="Search" />
187
+ <Button icon="icon_google_settings" label="Settings" />
188
+ <Button icon="icon_google_home" label="Home" />
189
+ <Button icon="icon_google_check" label="Confirm" />
190
+ <Button icon="icon_google_arrow_back" label="Back" />
191
+ ```
192
+
193
+ ## Usage Examples
194
+
195
+ ### Dialog Actions
196
+
197
+ ```svelte
198
+ <script lang="ts">
199
+ import ActionBar from '@ticatec/uniface-element/ActionBar';
200
+ import type { ButtonActions } from '@ticatec/uniface-element';
201
+
202
+ export let onSave: () => Promise<void>;
203
+ export let onCancel: () => void;
204
+
205
+ const dialogActions: ButtonActions = [
206
+ {
207
+ label: "Cancel",
208
+ type: "secondary",
209
+ handler: async () => {
210
+ onCancel();
211
+ }
212
+ },
213
+ {
214
+ label: "Save Changes",
215
+ type: "primary",
216
+ icon: "icon_google_save",
217
+ handler: async () => {
218
+ await onSave();
219
+ }
220
+ }
221
+ ];
222
+ </script>
223
+
224
+ <div class="dialog-footer">
225
+ <ActionBar buttons={dialogActions} style="justify-content: flex-end;" />
226
+ </div>
227
+ ```
228
+
229
+ ### Data Table Actions
230
+
231
+ ```svelte
232
+ <script lang="ts">
233
+ import IconButton from '@ticatec/uniface-element/IconButton';
234
+
235
+ export let item: any;
236
+ export let onEdit: (item: any) => Promise<void>;
237
+ export let onDelete: (item: any) => Promise<void>;
238
+ export let onView: (item: any) => Promise<void>;
239
+ </script>
240
+
241
+ <div class="table-actions">
242
+ <IconButton
243
+ icon="icon_google_visibility"
244
+ type="default"
245
+ onClick={async () => await onView(item)}
246
+ />
247
+ <IconButton
248
+ icon="icon_google_edit"
249
+ type="primary"
250
+ onClick={async () => await onEdit(item)}
251
+ />
252
+ <IconButton
253
+ icon="icon_google_delete"
254
+ type="third"
255
+ onClick={async () => await onDelete(item)}
256
+ />
257
+ </div>
258
+
259
+ <style>
260
+ .table-actions {
261
+ display: flex;
262
+ gap: 4px;
263
+ }
264
+ </style>
265
+ ```
266
+
267
+ ### Form Buttons
268
+
269
+ ```svelte
270
+ <script lang="ts">
271
+ import Button from '@ticatec/uniface-element/Button';
272
+ import TextButton from '@ticatec/uniface-element/TextButton';
273
+
274
+ let formData = {};
275
+ let isSubmitting = false;
276
+ let isDraft = false;
277
+
278
+ const handleSubmit = async () => {
279
+ isSubmitting = true;
280
+ try {
281
+ await submitForm(formData);
282
+ } finally {
283
+ isSubmitting = false;
284
+ }
285
+ };
286
+
287
+ const handleSaveDraft = async () => {
288
+ isDraft = true;
289
+ try {
290
+ await saveDraft(formData);
291
+ } finally {
292
+ isDraft = false;
293
+ }
294
+ };
295
+
296
+ const handleReset = async () => {
297
+ formData = {};
298
+ };
299
+ </script>
300
+
301
+ <form>
302
+ <!-- Form fields here -->
303
+
304
+ <div class="form-actions">
305
+ <TextButton
306
+ label="Reset"
307
+ type="default"
308
+ onClick={handleReset}
309
+ />
310
+
311
+ <Button
312
+ label={isDraft ? "Saving..." : "Save Draft"}
313
+ type="secondary"
314
+ icon="icon_google_save"
315
+ disabled={isDraft}
316
+ onClick={handleSaveDraft}
317
+ />
318
+
319
+ <Button
320
+ label={isSubmitting ? "Submitting..." : "Submit"}
321
+ type="primary"
322
+ icon="icon_google_send"
323
+ disabled={isSubmitting}
324
+ onClick={handleSubmit}
325
+ />
326
+ </div>
327
+ </form>
328
+
329
+ <style>
330
+ .form-actions {
331
+ display: flex;
332
+ gap: 12px;
333
+ justify-content: flex-end;
334
+ margin-top: 24px;
335
+ }
336
+ </style>
337
+ ```
338
+
339
+ ### Toolbar Implementation
340
+
341
+ ```svelte
342
+ <script lang="ts">
343
+ import ActionBar from '@ticatec/uniface-element/ActionBar';
344
+ import type { ButtonActions } from '@ticatec/uniface-element';
345
+
346
+ let selectedItems = [];
347
+
348
+ const toolbarActions: ButtonActions = [
349
+ {
350
+ label: "Select All",
351
+ icon: "icon_google_check_box",
352
+ type: "default",
353
+ handler: async () => {
354
+ selectAll();
355
+ }
356
+ },
357
+ null, // Separator
358
+ {
359
+ label: "Export",
360
+ icon: "icon_google_download",
361
+ type: "secondary",
362
+ disabled: selectedItems.length === 0,
363
+ handler: async () => {
364
+ await exportItems(selectedItems);
365
+ }
366
+ },
367
+ {
368
+ label: "Delete Selected",
369
+ icon: "icon_google_delete",
370
+ type: "third",
371
+ disabled: selectedItems.length === 0,
372
+ handler: async () => {
373
+ if (confirm(`Delete ${selectedItems.length} items?`)) {
374
+ await deleteItems(selectedItems);
375
+ }
376
+ }
377
+ }
378
+ ];
379
+ </script>
380
+
381
+ <div class="toolbar">
382
+ <div class="toolbar-info">
383
+ {selectedItems.length} items selected
384
+ </div>
385
+ <ActionBar buttons={toolbarActions} />
386
+ </div>
387
+
388
+ <style>
389
+ .toolbar {
390
+ display: flex;
391
+ justify-content: space-between;
392
+ align-items: center;
393
+ padding: 12px;
394
+ border-bottom: 1px solid #eee;
395
+ }
396
+
397
+ .toolbar-info {
398
+ color: #666;
399
+ font-size: 14px;
400
+ }
401
+ </style>
402
+ ```
403
+
404
+ ## Best Practices
405
+
406
+ ### 1. Use Appropriate Button Types
407
+
408
+ Choose the correct button type based on action importance:
409
+
410
+ ```svelte
411
+ <!-- Primary actions -->
412
+ <Button label="Save" type="primary" />
413
+ <Button label="Submit" type="primary" />
414
+
415
+ <!-- Secondary actions -->
416
+ <Button label="Cancel" type="secondary" />
417
+ <Button label="Preview" type="secondary" />
418
+
419
+ <!-- Dangerous actions -->
420
+ <Button label="Delete" type="third" />
421
+ <Button label="Remove" type="third" />
422
+ ```
423
+
424
+ ### 2. Handle Async Operations Properly
425
+
426
+ Always handle loading states and errors:
427
+
428
+ ```svelte
429
+ <script lang="ts">
430
+ let isLoading = false;
431
+ let error = null;
432
+
433
+ const handleAction = async () => {
434
+ isLoading = true;
435
+ error = null;
436
+
437
+ try {
438
+ await performAction();
439
+ } catch (err) {
440
+ error = err.message;
441
+ } finally {
442
+ isLoading = false;
443
+ }
444
+ };
445
+ </script>
446
+
447
+ <Button
448
+ label={isLoading ? "Processing..." : "Start Process"}
449
+ type="primary"
450
+ disabled={isLoading}
451
+ onClick={handleAction}
452
+ />
453
+
454
+ {#if error}
455
+ <div class="error">{error}</div>
456
+ {/if}
457
+ ```
458
+
459
+ ### 3. Use ActionBar to Group Related Actions
460
+
461
+ Group related actions together:
462
+
463
+ ```svelte
464
+ <script lang="ts">
465
+ const dialogActions = [
466
+ { label: "Cancel", type: "secondary", handler: cancel },
467
+ { label: "Apply", type: "primary", handler: apply }
468
+ ];
469
+
470
+ const editActions = [
471
+ { label: "Undo", icon: "icon_google_undo", handler: undo },
472
+ { label: "Redo", icon: "icon_google_redo", handler: redo },
473
+ null, // Separator
474
+ { label: "Save", type: "primary", handler: save }
475
+ ];
476
+ </script>
477
+ ```
478
+
479
+ ### 4. Provide Visual Feedback
480
+
481
+ Use icons and appropriate styling:
482
+
483
+ ```svelte
484
+ <!-- Success actions -->
485
+ <Button label="Save" icon="icon_google_save" type="primary" />
486
+
487
+ <!-- Dangerous actions -->
488
+ <Button label="Delete" icon="icon_google_delete" type="third" />
489
+
490
+ <!-- Navigation actions -->
491
+ <Button label="Back" icon="icon_google_arrow_back" type="secondary" />
492
+ ```
493
+
494
+ ### 5. Consider Mobile Responsiveness
495
+
496
+ Use appropriate sizes for different screen sizes:
497
+
498
+ ```svelte
499
+ <div class="responsive-buttons">
500
+ <!-- Desktop: normal size, Mobile: larger for touch -->
501
+ <Button label="Action" size="big" class="mobile-friendly" />
502
+ </div>
503
+
504
+ <style>
505
+ .responsive-buttons .mobile-friendly {
506
+ /* Responsive styles */
507
+ }
508
+
509
+ @media (max-width: 768px) {
510
+ .responsive-buttons .mobile-friendly {
511
+ min-height: 44px; /* iOS recommended touch target size */
512
+ }
513
+ }
514
+ </style>
515
+ ```
516
+
517
+ ## Accessibility
518
+
519
+ ### Current Limitations
520
+
521
+ **⚠️ Important Note**: The current button components have the following accessibility limitations:
522
+
523
+ - **Non-semantic elements**: All buttons use `<div>` elements instead of `<button>`
524
+ - **Hidden from screen readers**: All buttons have `aria-hidden="true"` by default
525
+ - **No keyboard navigation**: Components don't support Tab navigation or Enter/Space activation
526
+ - **No focus management**: Components don't provide focus method or support `bind:this`
527
+ - **No ARIA attribute support**: Custom aria-* attributes cannot be passed
528
+
529
+ ### Better Accessibility Suggestions
530
+
531
+ For production applications requiring full accessibility compliance, consider:
532
+
533
+ 1. **Wrap components in proper button elements**:
534
+ ```svelte
535
+ <button
536
+ class="custom-button-wrapper"
537
+ disabled={disabled}
538
+ aria-label="Edit user profile"
539
+ on:click={handleClick}
540
+ >
541
+ <IconButton
542
+ icon="icon_google_edit"
543
+ onClick={() => {}} // Handle through external button
544
+ />
545
+ </button>
546
+ ```
547
+
548
+ 2. **Add keyboard event handlers**:
549
+ ```svelte
550
+ <script>
551
+ const handleKeydown = (e) => {
552
+ if (e.key === 'Enter' || e.key === ' ') {
553
+ e.preventDefault();
554
+ handleClick(e);
555
+ }
556
+ };
557
+ </script>
558
+
559
+ <div
560
+ class="accessible-button"
561
+ role="button"
562
+ tabindex="0"
563
+ aria-label="Action description"
564
+ on:click={handleClick}
565
+ on:keydown={handleKeydown}
566
+ >
567
+ <Button onClick={() => {}} label="Action" />
568
+ </div>
569
+ ```
570
+
571
+ 3. **Programmatically manage focus**:
572
+ ```svelte
573
+ <script>
574
+ let buttonElement;
575
+
576
+ const focusButton = () => {
577
+ buttonElement?.focus();
578
+ };
579
+ </script>
580
+
581
+ <div
582
+ bind:this={buttonElement}
583
+ class="focusable-wrapper"
584
+ tabindex="0"
585
+ role="button"
586
+ on:click={handleAction}
587
+ >
588
+ <Button onClick={() => {}} label="Focusable Action" />
589
+ </div>
590
+ ```
591
+
592
+ ### Future Improvements Needed
593
+
594
+ To make these components fully accessible, the following changes are recommended:
595
+
596
+ - Replace `<div>` with `<button>` elements
597
+ - Remove `aria-hidden="true"` and allow ARIA attribute customization
598
+ - Add keyboard event handling
599
+ - Support focus management with `bind:this`
600
+ - Add proper semantic roles and states