Cilibiu Bogdan ef09b077c4 [ADF-4865] Upload Dialog - row actions not accessible by keyboard alone (#5051)
* access upload dialog information by keyboard

* upload files actions keyboard accessibility

* aria labels translation keys

* refractor styling

* toggle action icons

* update docs

* e2e

* e2e update action reference
2019-09-05 11:08:46 +01:00

35 lines
982 B
Markdown

---
Title: Toggle Icon directive
Added: v2.0.0
Status: Active
Last reviewed: 2019-04-09
---
# [Toggle Icon directive](../../../lib/content-services/upload/directives/toggle-icon.directive.ts 'Defined in toggle-icon.directive.ts')
Toggle icon on mouse or keyboard event for a selectable element.
## Example Usage
```html
<button mat-icon-button adf-toggle-icon #toggle="toggleIcon">
<mat-icon *ngIf="!toggle.isToggled">
check_circle
</mat-icon>
<mat-icon *ngIf="toggle.isToggled">
remove_circle
</mat-icon>
<button></button>
</button>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| --------- | --------- | ------------- | ----------------------------------------------- |
| isToggled | `boolean` | false | Is element active by mouseenter or focus event? |
| isFocused | `boolean` | false | Is element focused by keyboard navigation? |