You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following HTML tag in the template of my Component: <button [attr.data-cy]="'view-' + view.key" (click)="changeView(view.key)" *ngFor="let view of views" ngbDropdownItem role="menuitem" tabindex="1">
However, the HTML code in the rendered web page contains the following: <button _ngcontent-mvw-c33="" ngbdropdownitem="" role="menuitem" tabindex="0" class="dropdown-item ng-star-inserted" data-cy="view-BASIC">
i.e. ng-boostrap has replaced my tabindex="1" with tabindex="0"
NB: the corresponding ngbDropdownToggle button has tabindex="1" and that's why I need to also have tabindex="1" on all its children ngbDropdownItems in order to have the correct expected behavior when navigating with TAB key.
Expected behavior:
Bootstrap should preserve the tabindex provided by the user - OR - it should set the tabindex of the ngbDropdownItems to the same value that the tabindex of the corresponding ngbDropdownToggle.
Link to minimally-working StackBlitz that reproduces the issue:
Bug description:
I have the following HTML tag in the template of my Component:
<button [attr.data-cy]="'view-' + view.key" (click)="changeView(view.key)" *ngFor="let view of views" ngbDropdownItem role="menuitem" tabindex="1">
However, the HTML code in the rendered web page contains the following:
<button _ngcontent-mvw-c33="" ngbdropdownitem="" role="menuitem" tabindex="0" class="dropdown-item ng-star-inserted" data-cy="view-BASIC">
i.e. ng-boostrap has replaced my
tabindex="1"
withtabindex="0"
NB: the corresponding ngbDropdownToggle button has
tabindex="1"
and that's why I need to also havetabindex="1"
on all its children ngbDropdownItems in order to have the correct expected behavior when navigating with TAB key.Expected behavior:
Bootstrap should preserve the
tabindex
provided by the user - OR - it should set thetabindex
of the ngbDropdownItems to the same value that thetabindex
of the corresponding ngbDropdownToggle.Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-kuqznx?file=src%2Fapp%2Fdropdown-basic.html
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 15.2.8
ng-bootstrap: 14.2.0
Bootstrap: 5.3.2
The text was updated successfully, but these errors were encountered: