Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 522c287

Browse files
Googlernshahan
authored andcommitted
Update code to add isTabbable in MenuItemComponent. By default, it is true. If it is not tabbable, client code has to set isTabbable to be false.
PiperOrigin-RevId: 225255615
1 parent 5bef6b3 commit 522c287

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

angular_components/lib/material_menu/dropdown_menu.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ class DropdownMenuComponent extends Object
6767
focusable = _focusTarget;
6868
}
6969

70+
/// Whether the menu is tabbable or not.
71+
@Input()
72+
bool tabbable = true;
73+
7074
bool get dropdownStyle => _dropdownStyle;
7175
bool _dropdownStyle = false;
7276

angular_components/lib/material_menu/dropdown_menu.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
(trigger)="isExpanded=true"
88
[buttonText]="buttonText"
99
[disabled]="disabled"
10+
[tabbable]="tabbable"
1011
popupSource
1112
#toggle="popupSource">
1213
<ng-content select="[button-content]"></ng-content>

angular_components/lib/material_menu/material_menu.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import 'dart:async';
66
import 'dart:html';
77

88
import 'package:angular/angular.dart';
9-
import 'package:angular_components/interfaces/has_disabled.dart';
109
import 'package:angular_components/focus/focus.dart';
10+
import 'package:angular_components/interfaces/has_disabled.dart';
1111
import 'package:angular_components/material_button/material_button.dart';
1212
import 'package:angular_components/material_icon/material_icon.dart';
1313
import 'package:angular_components/material_menu/menu_popup.dart';
@@ -77,6 +77,10 @@ class MaterialMenuComponent extends Object
7777
@Input()
7878
bool disabled = false;
7979

80+
/// Whether the menu is tabbable or not.
81+
@Input()
82+
bool tabbable = true;
83+
8084
/// Aria label for button trigger.
8185
@Input()
8286
String ariaLabel;

angular_components/lib/material_menu/material_menu.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[attr.aria-label]="ariaLabel"
99
[attr.icon]="hasIcon"
1010
[disabled]="disabled"
11+
[tabbable]="tabbable"
1112
[materialTooltip]="tooltipText"
1213
[showTooltipIf]="hasTooltip"
1314
class="trigger-button"

0 commit comments

Comments
 (0)