Good afternoon!
When looking at the accessibility on XWiki, I quickly came up upon some issues in the Navigation panel:
- XWIKI-18356: “aria-labelledby” for navigation panel entries and corresponding ids contain illegal whitespaces
- XWIKI-18921: Panel Navigation: duplicated IDs
- XWIKI-19723: Navigation panel not accessible using a screen reader
Those issues are concerning for accessibility, but also just basic HTML standards: duplicate ids prevents the page from being correct HTML (usually browsers will find a correct solution to display the page even with these issues, but we should probably handle it on our hand).
JsTree has been used to replace YUI Tree since 2020, but this ticket was kept open in the hopes of finding a HTML+CSS replacement someday.
JsTree is an ‘old’ project, maintained by one person, almost inactive, and with a very poor code quality. I looked a bit to try and contribute to it, but the one ticket I opened was dismissed and closed quickly, and my request for help on the community forum did not get an answer in months.
I could not find proper tests for this dependency (the test
folder did not get an update in 8 years), and I’ll let you check the formatting with this snippet from the source:
rtl = this._data.core.rtl;
w = this.element.width();
this._data.core.focused = tmp.id;
a = obj.children(‘.jstree-anchor’).trigger(‘focus’);
s = $(‘’);
JSTree is used in the tree macro, the module name being xwiki-platform-tree-webjar
. The tree macro (and the document tree macro) are used everywhere in XWiki, from the breadcrumb dropdowns to the navigation panel and the XAR export UI. I think keeping XWiki so heavily reliant on such a dependency is not a good idea.
I propose to replace this dependency with our own tree module made from CSS and HTML, with a bit of Javascript (jquery).
If this proposal is accepted I can take care of making sure it advances, with a design page to record research and conclusions on the subject, further forum proposals to detail more the content of these changes, and updates to the xwiki-platform-tree-webjar
module.
Thank you in advance for your feedback!