Friday, September 1, 2017

How can I tell which tab in an ARIA Tab Panel is selected in an Angular 4 app?

You can make each div with role="tabpanel" on it a ViewChild variable and then look to see if this.whatever.nativeElement.className contains the string "active" or for some comparable telling marker.

 
 

Addendum 1/12/2018: What I suggest are ARIA tabs here are actually Bootstrap 4 tabs as suggested here.

No comments:

Post a Comment