You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/action-bar/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## Description
1
+
## Overview
2
2
3
3
A `<sp-action-bar>` delivers a floating action bar that is a convenient way to deliver stateful actions in cases like selection mode. `<sp-action-bar>` can be deployed in two variants beyond the default: `[varient="fixed"]` to position the element in relation to the page, and `[variant=sticky]` to position the content in relation to content that may scroll.
@@ -129,11 +131,13 @@ import { ActionButton } from '@spectrum-web-components/action-button';
129
131
</sp-tab-panel>
130
132
</sp-tabs>
131
133
132
-
## Variants
134
+
####Variants
133
135
134
136
The `<sp-action-button>` can be customized with either or both of the `emphasized` and `quiet` attributes. These will pair with either or both of the state attributes (`selected` and `disabled`) to decide the final visual delivery of the `<sp-action-button>`. Content addressed to the `icon` slot can also be provided and will be positioned just before the rest of the the supplied button content.
@@ -211,7 +215,9 @@ The `<sp-action-button>` can be customized with either or both of the `emphasize
211
215
</div>
212
216
```
213
217
214
-
### Quiet
218
+
</sp-tab-panel>
219
+
<sp-tabvalue="quiet">Quiet</sp-tab>
220
+
<sp-tab-panelvalue="quiet">
215
221
216
222
```html demo
217
223
<div
@@ -289,7 +295,9 @@ The `<sp-action-button>` can be customized with either or both of the `emphasize
289
295
</div>
290
296
```
291
297
292
-
### Emphasized
298
+
</sp-tab-panel>
299
+
<sp-tabvalue="emphasized">Emphasized</sp-tab>
300
+
<sp-tab-panelvalue="emphasized">
293
301
294
302
```html demo
295
303
<div
@@ -369,7 +377,9 @@ The `<sp-action-button>` can be customized with either or both of the `emphasize
369
377
</div>
370
378
```
371
379
372
-
### Emphasized + Quiet
380
+
</sp-tab-panel>
381
+
<sp-tabvalue="emq">Emphasized + quiet</sp-tab>
382
+
<sp-tab-panelvalue="emq">
373
383
374
384
```html demo
375
385
<div
@@ -455,7 +465,12 @@ The `<sp-action-button>` can be customized with either or both of the `emphasize
455
465
</div>
456
466
```
457
467
458
-
## Action button with hold affordance
468
+
</sp-tab-panel>
469
+
</sp-tabs>
470
+
471
+
### Behaviors
472
+
473
+
#### Action button with hold affordance
459
474
460
475
The use of the `hold-affordance` attribute signifies that the `<sp-action-button>` in question will be delivered with a visual affordance outlining that special interaction with the button will dispatch a `longpress` event. Via a pointer input, this even will be dispatched when 300ms has passed after a `pointerdown` event without the presence of a `pointerup` or `pointercancel` event. Via the keyboard, an event with a code of `Space` or or `ArrowDown` while `altKey === true` will dispatch the event.
461
476
@@ -499,49 +514,70 @@ The use of the `hold-affordance` attribute signifies that the `<sp-action-button
499
514
</div>
500
515
```
501
516
502
-
## Toggles
517
+
####Toggles
503
518
504
519
With the application of the `toggles` attribute, the button will self manage its `selected` property on `click`. When this value is updated, a cancellable `change` event will be dispatched to inform the parent application.
Events handlers for clicks and other user actions can be registered on a
547
583
`<sp-action-button>` as on a standard HTML `<button>` element.
@@ -562,3 +598,47 @@ In addition to handling events like a native `<button>` HTML element, one can al
562
598
Click me
563
599
</sp-action-button>
564
600
```
601
+
602
+
### Accessibility
603
+
604
+
#### Include a label
605
+
606
+
A button is required to have either a visible text label or a `label` attribute on either the `<sp-button>` itself,
607
+
or on an `<sp-icon*>` element child.
608
+
609
+
#### Don't override color
610
+
611
+
Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible.
612
+
613
+
#### Use static black or static white to contrast with backgrounds and images
614
+
615
+
To ensure maximum contrast with the background, use static black for light backgrounds and images, and static white for dark backgrounds and images. Avoid placing static components on top of busy images with a lot of variance in contrast.
616
+
617
+
<sp-tabsselected="black"autolabel="Static variants for contrast">
618
+
<sp-tabvalue="black">Static black on light background</sp-tab>
Copy file name to clipboardExpand all lines: packages/action-menu/README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
## Description
1
+
## Overview
2
2
3
-
An `<sp-action-menu>` is an action button that triggers an overlay with `<sp-menu-items>` for activation. Use an `<sp-menu>` element to outline the items that will be made available to the user when interacting with the `<sp-action-menu>` element. By default `<sp-action-menu>` does not manage a selection. If you'd like for a selection to be held by the `<sp-menu>` that is presented in its overlay, use `selects="single"` to activate this functionality.
3
+
An `<sp-action-menu>` is an action button that triggers an overlay with `<sp-menu-items>` for activation. Use an `<sp-menu>` element to outline the items that will be made available to the user when interacting with the `<sp-action-menu>` element. By default,`<sp-action-menu>` does not manage a selection. If you'd like for a selection to be managed, use `selects="single"` on the `<sp-menu>` to activate this functionality.
4
4
5
5
### Usage
6
6
@@ -30,9 +30,11 @@ When looking to leverage the `ActionMenu` base class as a type and/or for extens
30
30
import { ActionMenu } from '@spectrum-web-components/action-menu';
Copy file name to clipboardExpand all lines: packages/button-group/README.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## Description
1
+
## Overview
2
2
3
3
`sp-button-group` delivers a set of buttons in horizontal or vertical orientation while ensuring the appropriate spacing between those buttons.
4
4
@@ -24,7 +24,11 @@ When looking to leverage the `ButtonGroup` base class as a type and/or for exten
24
24
import { ButtonGroup } from '@spectrum-web-components/button-group';
25
25
```
26
26
27
-
## Horizontal
27
+
### Options
28
+
29
+
A button group can be either horizontal or vertical in its orientation. By default, a button group is horizontal. Use vertical option when horizontal space is limited.
30
+
31
+
#### Horizontal
28
32
29
33
```html
30
34
<sp-button-group>
@@ -34,7 +38,7 @@ import { ButtonGroup } from '@spectrum-web-components/button-group';
34
38
</sp-button-group>
35
39
```
36
40
37
-
## Vertical
41
+
####Vertical
38
42
39
43
```html
40
44
<sp-button-groupvertical>
@@ -43,3 +47,7 @@ import { ButtonGroup } from '@spectrum-web-components/button-group';
43
47
<sp-button>Short 3</sp-button>
44
48
</sp-button-group>
45
49
```
50
+
51
+
### Accessibility
52
+
53
+
Review the guidelines for the [button](../button#accessibility-guidelines) children.
0 commit comments