Skip to content

Commit 74eed6f

Browse files
fix(tab): add correct id to tab content wrapper element (#3124)
Co-authored-by: Akshat Patel <38994122+Akshat55@users.noreply.github.com>
1 parent 61f0b75 commit 74eed6f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/tabs/tab.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import {
6060
role="tabpanel"
6161
*ngIf="shouldRender()"
6262
class="cds--tab-content"
63+
[id]="id"
6364
[ngStyle]="{'display': active ? null : 'none'}"
6465
[attr.aria-labelledby]="id + '-header'"
6566
aria-live="polite">
@@ -128,10 +129,6 @@ export class Tab implements OnInit {
128129
* Value 'selected' to be emitted after a new `Tab` is selected.
129130
*/
130131
@Output() selected: EventEmitter<void> = new EventEmitter<void>();
131-
/**
132-
* Used to set the id property on the element.
133-
*/
134-
@HostBinding("attr.id") attrClass = this.id;
135132

136133
get cacheActive() {
137134
return this._cacheActive;

0 commit comments

Comments
 (0)