@@ -66,7 +66,7 @@ let nextId = 0;
6666 selector : "ibm-tab" ,
6767 template : `
6868 <div
69- tabIndex="0 "
69+ [tabindex]="tabIndex "
7070 role="tabpanel"
7171 *ngIf="shouldRender()"
7272 [ngStyle]="{'display': active ? null : 'none'}"
@@ -79,55 +79,48 @@ export class Tab implements OnInit {
7979 /**
8080 * Boolean value reflects if the `Tab` is using a custom template for the heading.
8181 * Default value is false.
82- * @memberof Tab
8382 */
8483 public headingIsTemplate = false ;
8584
8685 /**
8786 * The `Tab`'s title to be displayed or custom temaplate for the `Tab` heading.
8887 * @type {(string | TemplateRef<any>) }
89- * @memberof Tab
9088 */
9189 @Input ( ) heading : string | TemplateRef < any > ;
9290 /**
9391 * Indicates whether the `Tab` is active/selected.
9492 * Determines whether it's `TabPanel` is rendered.
95- * @memberof Tab
9693 */
9794 @Input ( ) active = false ;
9895 /**
9996 * Indicates whether or not the `Tab` item is disabled.
100- * @memberof Tab
10197 */
10298 @Input ( ) disabled = false ;
99+
100+ @Input ( ) tabIndex = 0 ;
103101 // do we need id's?
104102 /**
105103 * Sets the id of the `Tab`. Will be uniquely generated if not provided.
106- * @memberof Tab
107104 */
108105 @Input ( ) id = `n-tab-${ nextId ++ } ` ;
109106 /**
110107 * Set to true to have Tab items cached and not reloaded on tab switching.
111- * @memberof Tab
112108 */
113109 @Input ( ) cacheActive = false ;
114110 /**
115111 * Value 'selected' to be emitted after a new `Tab` is selected.
116112 * @type {EventEmitter<void> }
117- * @memberof Tab
118113 */
119114 @Output ( ) selected : EventEmitter < void > = new EventEmitter < void > ( ) ;
120115
121116 /**
122117 * Used to set the id property on the element.
123- * @memberof Tab
124118 */
125119 @HostBinding ( "attr.id" ) attrClass = this . id ;
126120
127121 /**
128122 * Checks for custom heading template on initialization and updates the value
129123 * of the boolean 'headingIsTemplate'.
130- * @memberof Tab
131124 */
132125 ngOnInit ( ) {
133126 if ( this . heading instanceof TemplateRef ) {
@@ -137,7 +130,6 @@ export class Tab implements OnInit {
137130
138131 /**
139132 * Emit the status of the `Tab`, specifically 'select' and 'selected' properties.
140- * @memberof Tab
141133 */
142134 doSelect ( ) {
143135 this . selected . emit ( ) ;
@@ -146,7 +138,6 @@ export class Tab implements OnInit {
146138 /**
147139 * Returns value indicating whether this `Tab` should be rendered in a `TabPanel`.
148140 * @returns boolean
149- * @memberof Tab
150141 */
151142 shouldRender ( ) {
152143 return this . active || this . cacheActive ;
0 commit comments