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: docs/components/button.md
+23-1
Original file line number
Diff line number
Diff line change
@@ -236,6 +236,28 @@ attribute to buttons whose labels need a more descriptive label.
236
236
<md-elevated-buttonaria-label="Add a new contact">Add</md-elevated-button>
237
237
```
238
238
239
+
### Focusable and disabled
240
+
241
+
By default, disabled buttons are not focusable with the keyboard, while
242
+
soft-disabled buttons are. Some use cases encourage focusability of disabled
243
+
toolbar items to increase their discoverability.
244
+
245
+
See the
246
+
[ARIA guidelines on focusability of disabled controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls)<!-- {.external} -->
247
+
for guidance on when this is recommended.
248
+
249
+
```html
250
+
<divrole="toolbar">
251
+
<md-text-button>Copy</md-text-button>
252
+
<md-text-button>Cut</md-text-button>
253
+
<!--
254
+
This button is disabled but kept focusable to improve its discoverability
|`disabled`|`disabled`|`boolean`|`false`| Whether or not the button is disabled. |
737
+
|`softDisabled`|`soft-disabled`|`boolean`|`false`| Whether the button is "soft-disabled" (disabled but still focusable). |
716
738
|`href`|`href`|`string`|`''`| The URL that the link button points to. |
717
739
|`target`|`target`|`string`|`''`| Where to display the linked `href` URL for a link button. Common options include `_blank` to open in a new tab. |
718
740
|`trailingIcon`|`trailing-icon`|`boolean`|`false`| Whether to render the icon at the inline end of the label rather than the inline start.<br>_Note:_ Link buttons cannot have trailing icons. |
Copy file name to clipboardExpand all lines: docs/components/icon-button.md
+25-3
Original file line number
Diff line number
Diff line change
@@ -182,6 +182,28 @@ attribute to icon buttons whose labels need a more descriptive label.
182
182
</md-icon-button>
183
183
```
184
184
185
+
### Focusable and disabled
186
+
187
+
By default, disabled icon buttons are not focusable with the keyboard, while
188
+
soft-disabled icon buttons are. Some use cases encourage focusability of
189
+
disabled toolbar items to increase their discoverability.
190
+
191
+
See the
192
+
[ARIA guidelines on focusability of disabled controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls)<!-- {.external} -->
0 commit comments