@sveltia/ui 0.41.2 → 0.41.5
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.
- package/dist/components/alert/alert.svelte +3 -1
- package/dist/components/alert/alert.svelte.d.ts +8 -0
- package/dist/components/alert/infobar.svelte +3 -1
- package/dist/components/alert/infobar.svelte.d.ts +8 -0
- package/dist/components/button/button-group.svelte +3 -1
- package/dist/components/button/button-group.svelte.d.ts +8 -0
- package/dist/components/button/select-button-group.svelte +3 -0
- package/dist/components/button/select-button-group.svelte.d.ts +8 -0
- package/dist/components/checkbox/checkbox-group.svelte +3 -0
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +8 -0
- package/dist/components/checkbox/checkbox.svelte +2 -2
- package/dist/components/checkbox/checkbox.svelte.d.ts +2 -2
- package/dist/components/divider/divider.svelte +3 -0
- package/dist/components/divider/divider.svelte.d.ts +8 -0
- package/dist/components/grid/grid.svelte +3 -0
- package/dist/components/grid/grid.svelte.d.ts +8 -0
- package/dist/components/listbox/listbox.svelte +3 -0
- package/dist/components/listbox/listbox.svelte.d.ts +8 -0
- package/dist/components/menu/menu.svelte +3 -0
- package/dist/components/menu/menu.svelte.d.ts +8 -0
- package/dist/components/progressbar/progressbar.svelte +3 -0
- package/dist/components/progressbar/progressbar.svelte.d.ts +8 -0
- package/dist/components/radio/radio-group.svelte +3 -0
- package/dist/components/radio/radio-group.svelte.d.ts +8 -0
- package/dist/components/resizable-pane/resizable-handle.svelte +3 -0
- package/dist/components/resizable-pane/resizable-handle.svelte.d.ts +8 -0
- package/dist/components/select/combobox.svelte +4 -1
- package/dist/components/switch/switch.svelte +3 -0
- package/dist/components/switch/switch.svelte.d.ts +8 -0
- package/dist/components/table/table.svelte +3 -1
- package/dist/components/table/table.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-list.svelte +3 -0
- package/dist/components/tabs/tab-list.svelte.d.ts +8 -0
- package/dist/components/text-editor/constants.d.ts +9 -0
- package/dist/components/text-editor/constants.js +26 -2
- package/dist/components/text-editor/core.js +9 -1
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +2 -1
- package/dist/components/text-field/text-input.svelte +1 -1
- package/dist/components/toolbar/toolbar.svelte +3 -0
- package/dist/components/toolbar/toolbar.svelte.d.ts +8 -0
- package/dist/components/util/group.svelte +3 -0
- package/dist/components/util/group.svelte.d.ts +8 -0
- package/dist/locales/en.yaml +50 -3
- package/dist/locales/ja.yaml +49 -2
- package/dist/typedefs.d.ts +5 -1
- package/dist/typedefs.js +2 -1
- package/package.json +4 -4
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {object} Props
|
|
16
16
|
* @property {'error' | 'warning' | 'info' | 'success'} status Alert status.
|
|
17
|
+
* @property {'off' | 'polite' | 'assertive'} [ariaLive] ARIA live region politeness.
|
|
17
18
|
* @property {Snippet} [children] Primary slot content.
|
|
18
19
|
* @property {Snippet} [icon] Icon slot content.
|
|
19
20
|
*/
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
let {
|
|
25
26
|
/* eslint-disable prefer-const */
|
|
26
27
|
status,
|
|
28
|
+
ariaLive = 'assertive',
|
|
27
29
|
children,
|
|
28
30
|
icon,
|
|
29
31
|
...restProps
|
|
@@ -31,7 +33,7 @@
|
|
|
31
33
|
} = $props();
|
|
32
34
|
</script>
|
|
33
35
|
|
|
34
|
-
<div {...restProps} role="alert" class="sui alert {status}">
|
|
36
|
+
<div {...restProps} role="alert" class="sui alert {status}" aria-live={ariaLive}>
|
|
35
37
|
{#if icon}
|
|
36
38
|
{@render icon()}
|
|
37
39
|
{:else}
|
|
@@ -13,6 +13,10 @@ declare const Alert: import("svelte").Component<{
|
|
|
13
13
|
* Alert status.
|
|
14
14
|
*/
|
|
15
15
|
status: "error" | "warning" | "info" | "success";
|
|
16
|
+
/**
|
|
17
|
+
* ARIA live region politeness.
|
|
18
|
+
*/
|
|
19
|
+
ariaLive?: "off" | "polite" | "assertive" | undefined;
|
|
16
20
|
/**
|
|
17
21
|
* Primary slot content.
|
|
18
22
|
*/
|
|
@@ -27,6 +31,10 @@ type Props = {
|
|
|
27
31
|
* Alert status.
|
|
28
32
|
*/
|
|
29
33
|
status: "error" | "warning" | "info" | "success";
|
|
34
|
+
/**
|
|
35
|
+
* ARIA live region politeness.
|
|
36
|
+
*/
|
|
37
|
+
ariaLive?: "off" | "polite" | "assertive" | undefined;
|
|
30
38
|
/**
|
|
31
39
|
* Primary slot content.
|
|
32
40
|
*/
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @property {boolean} [show] Whether to show the toast.
|
|
13
13
|
* @property {boolean} [dismissible] Whether to show the close button.
|
|
14
14
|
* @property {'error' | 'warning' | 'info' | 'success'} [status] Information status.
|
|
15
|
+
* @property {'off' | 'polite' | 'assertive'} [ariaLive] ARIA live region politeness.
|
|
15
16
|
* @property {Snippet} [children] Primary slot content.
|
|
16
17
|
* @property {Snippet} [icon] Icon slot content.
|
|
17
18
|
*/
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
show = $bindable(true),
|
|
23
24
|
dismissible = true,
|
|
24
25
|
status = 'info',
|
|
26
|
+
ariaLive = 'polite',
|
|
25
27
|
children = undefined,
|
|
26
28
|
icon = undefined,
|
|
27
29
|
/* eslint-enable prefer-const */
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
|
|
31
33
|
{#if show}
|
|
32
34
|
<div role="none" class="infobar {status}">
|
|
33
|
-
<div role="alert" class="message">
|
|
35
|
+
<div role="alert" class="message" aria-live={ariaLive}>
|
|
34
36
|
{#if icon}
|
|
35
37
|
{@render icon()}
|
|
36
38
|
{:else}
|
|
@@ -16,6 +16,10 @@ declare const Infobar: import("svelte").Component<{
|
|
|
16
16
|
* Information status.
|
|
17
17
|
*/
|
|
18
18
|
status?: "error" | "warning" | "info" | "success" | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* ARIA live region politeness.
|
|
21
|
+
*/
|
|
22
|
+
ariaLive?: "off" | "polite" | "assertive" | undefined;
|
|
19
23
|
/**
|
|
20
24
|
* Primary slot content.
|
|
21
25
|
*/
|
|
@@ -38,6 +42,10 @@ type Props = {
|
|
|
38
42
|
* Information status.
|
|
39
43
|
*/
|
|
40
44
|
status?: "error" | "warning" | "info" | "success" | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* ARIA live region politeness.
|
|
47
|
+
*/
|
|
48
|
+
ariaLive?: "off" | "polite" | "assertive" | undefined;
|
|
41
49
|
/**
|
|
42
50
|
* Primary slot content.
|
|
43
51
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {object} Props
|
|
8
8
|
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
9
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
9
10
|
* @property {Snippet} [children] Primary slot content.
|
|
10
11
|
*/
|
|
11
12
|
|
|
@@ -15,13 +16,14 @@
|
|
|
15
16
|
let {
|
|
16
17
|
/* eslint-disable prefer-const */
|
|
17
18
|
class: className,
|
|
19
|
+
ariaLabel = undefined,
|
|
18
20
|
children,
|
|
19
21
|
...restProps
|
|
20
22
|
/* eslint-enable prefer-const */
|
|
21
23
|
} = $props();
|
|
22
24
|
</script>
|
|
23
25
|
|
|
24
|
-
<div {...restProps} role="group" class="sui button-group {className}">
|
|
26
|
+
<div {...restProps} role="group" class="sui button-group {className}" aria-label={ariaLabel}>
|
|
25
27
|
{@render children?.()}
|
|
26
28
|
</div>
|
|
27
29
|
|
|
@@ -8,6 +8,10 @@ declare const ButtonGroup: import("svelte").Component<{
|
|
|
8
8
|
* The `class` attribute on the wrapper element.
|
|
9
9
|
*/
|
|
10
10
|
class?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* The `aria-label` attribute on the wrapper element.
|
|
13
|
+
*/
|
|
14
|
+
ariaLabel?: string | undefined;
|
|
11
15
|
/**
|
|
12
16
|
* Primary slot content.
|
|
13
17
|
*/
|
|
@@ -18,6 +22,10 @@ type Props = {
|
|
|
18
22
|
* The `class` attribute on the wrapper element.
|
|
19
23
|
*/
|
|
20
24
|
class?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The `aria-label` attribute on the wrapper element.
|
|
27
|
+
*/
|
|
28
|
+
ariaLabel?: string | undefined;
|
|
21
29
|
/**
|
|
22
30
|
* Primary slot content.
|
|
23
31
|
*/
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* `aria-required` attribute.
|
|
24
24
|
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
25
25
|
* `aria-invalid` attribute.
|
|
26
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
26
27
|
* @property {Snippet} [children] Primary slot content.
|
|
27
28
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
28
29
|
*/
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
readonly = false,
|
|
39
40
|
required = false,
|
|
40
41
|
invalid = false,
|
|
42
|
+
ariaLabel = undefined,
|
|
41
43
|
children,
|
|
42
44
|
...restProps
|
|
43
45
|
/* eslint-enable prefer-const */
|
|
@@ -55,6 +57,7 @@
|
|
|
55
57
|
aria-readonly={readonly}
|
|
56
58
|
aria-required={required}
|
|
57
59
|
aria-invalid={invalid}
|
|
60
|
+
aria-label={ariaLabel}
|
|
58
61
|
{@attach activateGroup()}
|
|
59
62
|
>
|
|
60
63
|
<div role="none" class="inner" inert={disabled}>
|
|
@@ -37,6 +37,10 @@ declare const SelectButtonGroup: import("svelte").Component<{
|
|
|
37
37
|
* `aria-invalid` attribute.
|
|
38
38
|
*/
|
|
39
39
|
invalid?: boolean | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The `aria-label` attribute on the wrapper element.
|
|
42
|
+
*/
|
|
43
|
+
ariaLabel?: string | undefined;
|
|
40
44
|
/**
|
|
41
45
|
* Primary slot content.
|
|
42
46
|
*/
|
|
@@ -75,6 +79,10 @@ type Props = {
|
|
|
75
79
|
* `aria-invalid` attribute.
|
|
76
80
|
*/
|
|
77
81
|
invalid?: boolean | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* The `aria-label` attribute on the wrapper element.
|
|
84
|
+
*/
|
|
85
|
+
ariaLabel?: string | undefined;
|
|
78
86
|
/**
|
|
79
87
|
* Primary slot content.
|
|
80
88
|
*/
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
16
16
|
* attribute.
|
|
17
17
|
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget.
|
|
18
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
18
19
|
* @property {Snippet} [children] Primary slot content.
|
|
19
20
|
*/
|
|
20
21
|
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
hidden = false,
|
|
28
29
|
disabled = false,
|
|
29
30
|
orientation = 'horizontal',
|
|
31
|
+
ariaLabel = undefined,
|
|
30
32
|
children,
|
|
31
33
|
...restProps
|
|
32
34
|
/* eslint-enable prefer-const */
|
|
@@ -41,6 +43,7 @@
|
|
|
41
43
|
aria-hidden={hidden}
|
|
42
44
|
aria-disabled={disabled}
|
|
43
45
|
aria-roledescription="checkbox group"
|
|
46
|
+
aria-label={ariaLabel}
|
|
44
47
|
>
|
|
45
48
|
<div role="none" class="inner" inert={disabled}>
|
|
46
49
|
{@render children?.()}
|
|
@@ -23,6 +23,10 @@ declare const CheckboxGroup: import("svelte").Component<{
|
|
|
23
23
|
* Orientation of the widget.
|
|
24
24
|
*/
|
|
25
25
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The `aria-label` attribute on the wrapper element.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel?: string | undefined;
|
|
26
30
|
/**
|
|
27
31
|
* Primary slot content.
|
|
28
32
|
*/
|
|
@@ -47,6 +51,10 @@ type Props = {
|
|
|
47
51
|
* Orientation of the widget.
|
|
48
52
|
*/
|
|
49
53
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The `aria-label` attribute on the wrapper element.
|
|
56
|
+
*/
|
|
57
|
+
ariaLabel?: string | undefined;
|
|
50
58
|
/**
|
|
51
59
|
* Primary slot content.
|
|
52
60
|
*/
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @property {boolean | 'mixed'} [checked] Whether to check the widget. An alias of the
|
|
25
25
|
* `aria-checked` attribute.
|
|
26
26
|
* @property {string} [label] Text label displayed next to the checkbox.
|
|
27
|
-
* @property {string} [
|
|
27
|
+
* @property {string} [ariaLabel] `aria-label` attribute.
|
|
28
28
|
* @property {Snippet} [checkIcon] Check icon slot content.
|
|
29
29
|
* @property {string[]} [group] The two-way bound variable to manage the state of a group of
|
|
30
30
|
* checkboxes. It works in the same way as the [`<input
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
required = false,
|
|
47
47
|
invalid = false,
|
|
48
48
|
label = undefined,
|
|
49
|
-
|
|
49
|
+
ariaLabel = undefined,
|
|
50
50
|
group = $bindable(),
|
|
51
51
|
onChange,
|
|
52
52
|
children,
|
|
@@ -36,7 +36,7 @@ declare const Checkbox: import("svelte").Component<ButtonProps & import("../../t
|
|
|
36
36
|
/**
|
|
37
37
|
* `aria-label` attribute.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
ariaLabel?: string | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* Check icon slot content.
|
|
42
42
|
*/
|
|
@@ -75,7 +75,7 @@ type Props = {
|
|
|
75
75
|
/**
|
|
76
76
|
* `aria-label` attribute.
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
ariaLabel?: string | undefined;
|
|
79
79
|
/**
|
|
80
80
|
* Check icon slot content.
|
|
81
81
|
*/
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* attribute.
|
|
12
12
|
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
13
13
|
* `aria-orientation` attribute.
|
|
14
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
class: className,
|
|
22
23
|
hidden = false,
|
|
23
24
|
orientation = 'horizontal',
|
|
25
|
+
ariaLabel = undefined,
|
|
24
26
|
...restProps
|
|
25
27
|
/* eslint-enable prefer-const */
|
|
26
28
|
} = $props();
|
|
@@ -33,6 +35,7 @@
|
|
|
33
35
|
{hidden}
|
|
34
36
|
aria-hidden={hidden}
|
|
35
37
|
aria-orientation={orientation}
|
|
38
|
+
aria-label={ariaLabel}
|
|
36
39
|
></div>
|
|
37
40
|
|
|
38
41
|
<style>.divider {
|
|
@@ -22,6 +22,10 @@ declare const Divider: import("svelte").Component<{
|
|
|
22
22
|
* `aria-orientation` attribute.
|
|
23
23
|
*/
|
|
24
24
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The `aria-label` attribute on the wrapper element.
|
|
27
|
+
*/
|
|
28
|
+
ariaLabel?: string | undefined;
|
|
25
29
|
} & Record<string, any>, {}, "">;
|
|
26
30
|
type Props = {
|
|
27
31
|
/**
|
|
@@ -38,4 +42,8 @@ type Props = {
|
|
|
38
42
|
* `aria-orientation` attribute.
|
|
39
43
|
*/
|
|
40
44
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The `aria-label` attribute on the wrapper element.
|
|
47
|
+
*/
|
|
48
|
+
ariaLabel?: string | undefined;
|
|
41
49
|
};
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* `<GridCell>`. An alias of the `aria-multiselectable` attribute.
|
|
19
19
|
* @property {boolean} [clickToSelect] Whether to select a row by clicking on it.
|
|
20
20
|
* @property {HTMLElement} [element] A reference to the wrapper element.
|
|
21
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
21
22
|
* @property {Snippet} [children] Primary slot content.
|
|
22
23
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
23
24
|
*/
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
class: className,
|
|
32
33
|
multiple = false,
|
|
33
34
|
clickToSelect = true,
|
|
35
|
+
ariaLabel = undefined,
|
|
34
36
|
children,
|
|
35
37
|
onChange,
|
|
36
38
|
...restProps
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
role="grid"
|
|
45
47
|
class="sui grid {className}"
|
|
46
48
|
aria-multiselectable={multiple}
|
|
49
|
+
aria-label={ariaLabel}
|
|
47
50
|
onChange={(/** @type {CustomEvent} */ event) => {
|
|
48
51
|
onChange?.(event);
|
|
49
52
|
}}
|
|
@@ -26,6 +26,10 @@ declare const Grid: import("svelte").Component<{
|
|
|
26
26
|
* A reference to the wrapper element.
|
|
27
27
|
*/
|
|
28
28
|
element?: HTMLElement | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The `aria-label` attribute on the wrapper element.
|
|
31
|
+
*/
|
|
32
|
+
ariaLabel?: string | undefined;
|
|
29
33
|
/**
|
|
30
34
|
* Primary slot content.
|
|
31
35
|
*/
|
|
@@ -53,6 +57,10 @@ type Props = {
|
|
|
53
57
|
* A reference to the wrapper element.
|
|
54
58
|
*/
|
|
55
59
|
element?: HTMLElement | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The `aria-label` attribute on the wrapper element.
|
|
62
|
+
*/
|
|
63
|
+
ariaLabel?: string | undefined;
|
|
56
64
|
/**
|
|
57
65
|
* Primary slot content.
|
|
58
66
|
*/
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* @property {boolean} [multiple] Whether to allow selecting more than one `<Option>`. An alias of
|
|
30
30
|
* the `aria-multiselectable` attribute.
|
|
31
31
|
* @property {string} [searchTerms] Search terms to be used to filter the items.
|
|
32
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
32
33
|
* @property {Snippet} [children] Primary slot content.
|
|
33
34
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
34
35
|
* @property {(event: CustomEvent) => void} [onFilter] Custom `Filter` event handler.
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
invalid = false,
|
|
48
49
|
multiple = false,
|
|
49
50
|
searchTerms = '',
|
|
51
|
+
ariaLabel = undefined,
|
|
50
52
|
children,
|
|
51
53
|
onFilter,
|
|
52
54
|
...restProps
|
|
@@ -72,6 +74,7 @@
|
|
|
72
74
|
aria-required={required}
|
|
73
75
|
aria-invalid={invalid}
|
|
74
76
|
aria-multiselectable={multiple}
|
|
77
|
+
aria-label={ariaLabel}
|
|
75
78
|
onFilter={(/** @type {CustomEvent} */ event) => {
|
|
76
79
|
const {
|
|
77
80
|
detail: { matched, total },
|
|
@@ -48,6 +48,10 @@ declare const Listbox: import("svelte").Component<import("../../typedefs").Keybo
|
|
|
48
48
|
* Search terms to be used to filter the items.
|
|
49
49
|
*/
|
|
50
50
|
searchTerms?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* The `aria-label` attribute on the wrapper element.
|
|
53
|
+
*/
|
|
54
|
+
ariaLabel?: string | undefined;
|
|
51
55
|
/**
|
|
52
56
|
* Primary slot content.
|
|
53
57
|
*/
|
|
@@ -100,6 +104,10 @@ type Props = {
|
|
|
100
104
|
* Search terms to be used to filter the items.
|
|
101
105
|
*/
|
|
102
106
|
searchTerms?: string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* The `aria-label` attribute on the wrapper element.
|
|
109
|
+
*/
|
|
110
|
+
ariaLabel?: string | undefined;
|
|
103
111
|
/**
|
|
104
112
|
* Primary slot content.
|
|
105
113
|
*/
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* attribute.
|
|
19
19
|
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
20
20
|
* attribute.
|
|
21
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
21
22
|
* @property {Snippet} [children] Primary slot content.
|
|
22
23
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
23
24
|
*/
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
class: className,
|
|
31
32
|
hidden = false,
|
|
32
33
|
disabled = false,
|
|
34
|
+
ariaLabel = undefined,
|
|
33
35
|
children,
|
|
34
36
|
onChange,
|
|
35
37
|
...restProps
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
{hidden}
|
|
45
47
|
aria-hidden={hidden}
|
|
46
48
|
aria-disabled={disabled}
|
|
49
|
+
aria-label={ariaLabel}
|
|
47
50
|
onChange={(/** @type {CustomEvent} */ event) => {
|
|
48
51
|
onChange?.(event);
|
|
49
52
|
}}
|
|
@@ -23,6 +23,10 @@ declare const Menu: import("svelte").Component<{
|
|
|
23
23
|
* attribute.
|
|
24
24
|
*/
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The `aria-label` attribute on the wrapper element.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel?: string | undefined;
|
|
26
30
|
/**
|
|
27
31
|
* Primary slot content.
|
|
28
32
|
*/
|
|
@@ -47,6 +51,10 @@ type Props = {
|
|
|
47
51
|
* attribute.
|
|
48
52
|
*/
|
|
49
53
|
disabled?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The `aria-label` attribute on the wrapper element.
|
|
56
|
+
*/
|
|
57
|
+
ariaLabel?: string | undefined;
|
|
50
58
|
/**
|
|
51
59
|
* Primary slot content.
|
|
52
60
|
*/
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @property {number} [min] The `aria-valuemin` attribute on the wrapper element.
|
|
12
12
|
* @property {number} [max] The `aria-valuemax` attribute on the wrapper element.
|
|
13
13
|
* @property {string} [text] The `aria-valuetext` attribute on the wrapper element.
|
|
14
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
min = 0,
|
|
24
25
|
max = 100,
|
|
25
26
|
text,
|
|
27
|
+
ariaLabel = undefined,
|
|
26
28
|
...restProps
|
|
27
29
|
/* eslint-enable prefer-const */
|
|
28
30
|
} = $props();
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
aria-valuemin={min}
|
|
37
39
|
aria-valuemax={max}
|
|
38
40
|
aria-valuetext={text}
|
|
41
|
+
aria-label={ariaLabel}
|
|
39
42
|
>
|
|
40
43
|
<div role="none" style:width="{now}%"></div>
|
|
41
44
|
</div>
|
|
@@ -28,6 +28,10 @@ declare const Progressbar: import("svelte").Component<{
|
|
|
28
28
|
* The `aria-valuetext` attribute on the wrapper element.
|
|
29
29
|
*/
|
|
30
30
|
text?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The `aria-label` attribute on the wrapper element.
|
|
33
|
+
*/
|
|
34
|
+
ariaLabel?: string | undefined;
|
|
31
35
|
} & Record<string, any>, {}, "">;
|
|
32
36
|
type Props = {
|
|
33
37
|
/**
|
|
@@ -50,4 +54,8 @@ type Props = {
|
|
|
50
54
|
* The `aria-valuetext` attribute on the wrapper element.
|
|
51
55
|
*/
|
|
52
56
|
text?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The `aria-label` attribute on the wrapper element.
|
|
59
|
+
*/
|
|
60
|
+
ariaLabel?: string | undefined;
|
|
53
61
|
};
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* `aria-invalid` attribute.
|
|
26
26
|
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
27
27
|
* `aria-orientation` attribute.
|
|
28
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
28
29
|
* @property {Snippet} [children] Primary slot content.
|
|
29
30
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
30
31
|
*/
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
required = false,
|
|
42
43
|
invalid = false,
|
|
43
44
|
orientation = 'horizontal',
|
|
45
|
+
ariaLabel = undefined,
|
|
44
46
|
children,
|
|
45
47
|
onChange,
|
|
46
48
|
...restProps
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
aria-required={required}
|
|
61
63
|
aria-invalid={invalid}
|
|
62
64
|
aria-orientation={orientation}
|
|
65
|
+
aria-label={ariaLabel}
|
|
63
66
|
onChange={(/** @type {CustomEvent} */ event) => {
|
|
64
67
|
onChange?.(event);
|
|
65
68
|
}}
|
|
@@ -42,6 +42,10 @@ declare const RadioGroup: import("svelte").Component<{
|
|
|
42
42
|
* `aria-orientation` attribute.
|
|
43
43
|
*/
|
|
44
44
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The `aria-label` attribute on the wrapper element.
|
|
47
|
+
*/
|
|
48
|
+
ariaLabel?: string | undefined;
|
|
45
49
|
/**
|
|
46
50
|
* Primary slot content.
|
|
47
51
|
*/
|
|
@@ -85,6 +89,10 @@ type Props = {
|
|
|
85
89
|
* `aria-orientation` attribute.
|
|
86
90
|
*/
|
|
87
91
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The `aria-label` attribute on the wrapper element.
|
|
94
|
+
*/
|
|
95
|
+
ariaLabel?: string | undefined;
|
|
88
96
|
/**
|
|
89
97
|
* Primary slot content.
|
|
90
98
|
*/
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* @property {boolean} [disabled] Whether to disable the handle.
|
|
19
19
|
* @property {boolean} [showHandleBar] Whether to show the handle bar.
|
|
20
20
|
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
21
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
21
22
|
* @property {Snippet} [children] Custom handle content. If omitted, a default visual indicator is
|
|
22
23
|
* rendered.
|
|
23
24
|
* @property {() => void} [onResizeStart] Called when a resize interaction begins (pointer down or
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
disabled = false,
|
|
35
36
|
showHandleBar = false,
|
|
36
37
|
class: className,
|
|
38
|
+
ariaLabel = undefined,
|
|
37
39
|
children,
|
|
38
40
|
onResizeStart,
|
|
39
41
|
onResizeEnd,
|
|
@@ -257,6 +259,7 @@
|
|
|
257
259
|
aria-valuemax={currentPaneMax}
|
|
258
260
|
aria-controls={ctx.paneDefs[handleIndex]?.id}
|
|
259
261
|
aria-disabled={disabled || undefined}
|
|
262
|
+
aria-label={ariaLabel}
|
|
260
263
|
class="sui resizable-handle {className ?? ''}"
|
|
261
264
|
class:horizontal={isHorizontal}
|
|
262
265
|
class:vertical={!isHorizontal}
|
|
@@ -21,6 +21,10 @@ declare const ResizableHandle: import("svelte").Component<{
|
|
|
21
21
|
* The `class` attribute on the wrapper element.
|
|
22
22
|
*/
|
|
23
23
|
class?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The `aria-label` attribute on the wrapper element.
|
|
26
|
+
*/
|
|
27
|
+
ariaLabel?: string | undefined;
|
|
24
28
|
/**
|
|
25
29
|
* Custom handle content. If omitted, a default visual indicator is
|
|
26
30
|
* rendered.
|
|
@@ -50,6 +54,10 @@ type Props = {
|
|
|
50
54
|
* The `class` attribute on the wrapper element.
|
|
51
55
|
*/
|
|
52
56
|
class?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The `aria-label` attribute on the wrapper element.
|
|
59
|
+
*/
|
|
60
|
+
ariaLabel?: string | undefined;
|
|
53
61
|
/**
|
|
54
62
|
* Custom handle content. If omitted, a default visual indicator is
|
|
55
63
|
* rendered.
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
editable = true,
|
|
42
42
|
position = 'bottom-left',
|
|
43
43
|
filterThreshold = 5,
|
|
44
|
+
ariaLabel = undefined,
|
|
44
45
|
children,
|
|
45
46
|
chevronIcon,
|
|
46
47
|
onChange,
|
|
@@ -134,6 +135,7 @@
|
|
|
134
135
|
aria-required={required}
|
|
135
136
|
aria-invalid={invalid}
|
|
136
137
|
aria-haspopup="listbox"
|
|
138
|
+
aria-label={ariaLabel}
|
|
137
139
|
>
|
|
138
140
|
<div role="none" class="label">
|
|
139
141
|
<TruncatedText>
|
|
@@ -157,6 +159,7 @@
|
|
|
157
159
|
aria-controls="{id}-popup"
|
|
158
160
|
aria-expanded={isPopupOpen}
|
|
159
161
|
aria-haspopup="listbox"
|
|
162
|
+
aria-label={ariaLabel}
|
|
160
163
|
/>
|
|
161
164
|
{/if}
|
|
162
165
|
<Button
|
|
@@ -235,7 +238,7 @@
|
|
|
235
238
|
{@render children?.()}
|
|
236
239
|
</Listbox>
|
|
237
240
|
{#if !hasMatchingOptions}
|
|
238
|
-
<div role="alert" class="no-options">
|
|
241
|
+
<div role="alert" class="no-options" aria-live="assertive">
|
|
239
242
|
{_('_sui.combobox.no_matching_options')}
|
|
240
243
|
</div>
|
|
241
244
|
{/if}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* `aria-required` attribute.
|
|
23
23
|
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
|
|
24
24
|
* `aria-invalid` attribute.
|
|
25
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
25
26
|
* @property {Snippet} [children] Primary slot content.
|
|
26
27
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
27
28
|
*/
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
readonly = false,
|
|
40
41
|
required = false,
|
|
41
42
|
invalid = false,
|
|
43
|
+
ariaLabel = undefined,
|
|
42
44
|
children,
|
|
43
45
|
onChange,
|
|
44
46
|
...restProps
|
|
@@ -59,6 +61,7 @@
|
|
|
59
61
|
aria-readonly={readonly}
|
|
60
62
|
aria-required={required}
|
|
61
63
|
aria-invalid={invalid}
|
|
64
|
+
aria-label={ariaLabel}
|
|
62
65
|
onclick={() => {
|
|
63
66
|
if (!disabled && !readonly) {
|
|
64
67
|
checked = !checked;
|
|
@@ -41,6 +41,10 @@ declare const Switch: import("svelte").Component<{
|
|
|
41
41
|
* `aria-invalid` attribute.
|
|
42
42
|
*/
|
|
43
43
|
invalid?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The `aria-label` attribute on the wrapper element.
|
|
46
|
+
*/
|
|
47
|
+
ariaLabel?: string | undefined;
|
|
44
48
|
/**
|
|
45
49
|
* Primary slot content.
|
|
46
50
|
*/
|
|
@@ -83,6 +87,10 @@ type Props = {
|
|
|
83
87
|
* `aria-invalid` attribute.
|
|
84
88
|
*/
|
|
85
89
|
invalid?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* The `aria-label` attribute on the wrapper element.
|
|
92
|
+
*/
|
|
93
|
+
ariaLabel?: string | undefined;
|
|
86
94
|
/**
|
|
87
95
|
* Primary slot content.
|
|
88
96
|
*/
|