telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
466 stars 215 forks source link

Focus not automatically shifted to popup on manually component `toggle` #4361

Open mbechev opened 1 month ago

mbechev commented 1 month ago

Describe the bug By default when a component popup is opened upon clicking the component (DropDownButton, DropDownList, DatePicker, etc), an element inside the popup is focused (for DropDownList this is the first option, for the DatePicker this is the date, etc.).

When a Kendo component popup is opened manually by using the built-in toggle method, the focus isn't inside the popup. Instead, the focus is on the button (in case a custom button is used to open the component popup).

image

The ColorPicker on the other side, correctly moves the focus from the custom button to the popup inside.

To Reproduce https://stackblitz.com/edit/angular-9uxkar

Expected behavior From an accessibility perspective, the focus should be moved inside the popup so that the user can directly select the desired value using the keyboard (as it behaves when the popup of the component is opened by using the default scenario).