Skip to content

Commit b19002b

Browse files
yanivc-msaarongreenwald
authored andcommitted
Add extra attributes to buttons (#149)
Added the option to provide "aria-selected" (ariaSelected) and "tabindex" (tabIndex) attributes to Fabric buttons
1 parent 7a3851d commit b19002b

10 files changed

+19
-1
lines changed

libs/fabric/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../../node_modules/ng-packagr/package.schema.json",
33
"name": "@angular-react/fabric",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"ngPackage": {
66
"lib": {
77
"entryFile": "public-api.ts",

libs/fabric/src/lib/components/button/action-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/base-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export abstract class FabBaseButtonComponent extends ReactWrapperComponent<IButt
4242
@Input() ariaLabel?: IButtonProps['ariaLabel'];
4343
@Input() ariaDescription?: IButtonProps['ariaDescription'];
4444
@Input() ariaHidden?: IButtonProps['ariaHidden'];
45+
@Input() ariaSelected?: IButtonProps['aria-selected'];
4546
@Input() role?: IButtonProps['role'];
47+
@Input() tabIndex?: IButtonProps['tabIndex'];
4648
@Input() text?: IButtonProps['text'];
4749
@Input() iconProps?: IButtonProps['iconProps'];
4850
@Input() menuProps?: IButtonProps['menuProps'];

libs/fabric/src/lib/components/button/command-bar-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/compound-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/default-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/icon-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/messagebar-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/primary-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

libs/fabric/src/lib/components/button/split-button.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ import { FabBaseButtonComponent } from './base-button.component';
3232
[ariaLabel]="ariaLabel"
3333
[ariaDescription]="ariaDescription"
3434
[ariaHidden]="ariaHidden"
35+
[aria-selected]="ariaSelected"
3536
[role]="role"
37+
[tabIndex]="tabIndex"
3638
[text]="text"
3739
[iconProps]="iconProps"
3840
[menuProps]="menuProps"

0 commit comments

Comments
 (0)