Skip to content

*ngIf affects button focus order #13034

@jasonpell

Description

@jasonpell

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I would expect focus to go to the first button in the overlay menu.

What is the current behavior?

If I navigate to a simple overlay menu via keyboard and enter it, focus goes to the first button that doesn't contain an ngIf attribute, regardless of if the ngIf conditional is true.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-zf82u8

  1. Go to https://angular-zf82u8.stackblitz.io/
  2. Tab to the button, then hit the space bar.
    Note that focus goes to the second button instead of the first.

Metadata

Metadata

Labels

GThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions