Hello!
In the context of XWIKI-18007: Drawer menu improvements for accessibility, I had to question the legitimity of relying on an external library to handle the drawer. As we needed a lot of changes done and the bootstrap 3 drawer library we were relying on didn’t get any updates in 4 years, I thought it would be easier to remove the dependency and implement its behaviour back in a few lines in a new PR. Note that this PR also implements extended accessibility for the drawer and has a delta (+) of only 160 lines.
I think the drawer library is not useful anymore because modern CSS support makes it trivial to style one ourselves. The most difficult part of a drawer is to handle how the user can interact with it. Keyboard navigation (which represents a fair part of the ways an user can interact with an element) and accessibility were barely accounted in the library.
In bootstrap 5, the offcanvas component holds this role.
The changes are proposed in this PR.
What do you think of this change? Do you agree with the proposal to remove the dependency to bootstrap drawer
?
Have a good day!
Lucas C.