Fix: Add contextual label to MainBar close button.
The close button in the MainBar subsections was only labeled as "Close" without indicating which specific subsection was being closed, causing accessibility issues for screen reader users.
Changes:
- Modified
mainbar.renderer.jsto dynamically update both aria-label and visible text of the close button when a slate is engaged - Added
toJS('close')in MainControlsRenderer.phpto expose the translation key to JavaScript - Close button now displays contextual information (e.g., "Close Personal Workspace" instead of just "Close")
This fix improves WCAG 2.1 compliance by providing clear context about which UI element will be affected by the close action.
Ticket 43949
Hello ZallaxDev!
Thank you very much for your suggestion to solve the problem and for providing the fix. Unfortunately, the control element for closing the sub-items of the main navigation is still only labeled “Close,” and it remains unclear when using a screen reader which area is being closed. Could you take another look at this?
Best regards, Annett
Hello @Annett7811,
We have reviewed the issue and sent a new commit to fix it.
We made a mistake in the files we sent, as in this case we modified JavaScript code that needs to be compiled to work with ILIAS using rollup. Although we built it in our installation, we forgot to include the compiled file in this PR.
With the latest commit, it has been added and should work without any issues.
Attached is a screenshot with our results.
We apologise for the error and hope that this change is acceptable. Thank you very much for your comment and your time 😊
Best regards, Daniel.