bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

Calendar date picker traps focus on Shift+Tab #9568

Open marciogurka opened 3 months ago

marciogurka commented 3 months ago

Forum post

"Hello!

I came across this issue during accessibility testing. It is easy to reproduce in this demo:

https://bryntum.com/products/calendar/examples/basic/

Put focus into the "Filter Events" input field below the date picker in the sidebar. Press Shift+Tab to move into the date picker (there is no focus indication at this point, which is another accessibility issue). Press Shift+Tab to move into the date picker's header. The "Next Year" button is focused. Press Shift+Tab two more times. The "Year" button is focused without indication (yet another accessibility issue). Keep pressing Shift+Tab, the focus moves to the "Previous Month" button, then to the "Previous Year" button, then disappears (at this point it is on the selected date), then it moves to the "Next Year" button again, effectively trapping the focus in the date picker.

Pressing Tab without Shift allows focus to escape the trap and move into the "Filter Events" input field, so the trap is only applied when moving backwards."

ghulamghousdev commented 2 months ago

Another report here: https://forum.bryntum.com/viewtopic.php?p=153503#p153503

ExtAnimal commented 2 months ago

DatePicker.js needs


    compose() {
        const result = super.compose();

        // Outer element must not gain focus
        result.tabIndex = null;
        return result;
    }