ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

Fix: Add contextual label to MainBar close button.

Open ZallaxDev opened this issue 2 months ago • 2 comments

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.js to dynamically update both aria-label and visible text of the close button when a slate is engaged
  • Added toJS('close') in MainControls Renderer.php to 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

ZallaxDev avatar Oct 16 '25 15:10 ZallaxDev

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? Bildschirmfoto 2025-12-09 um 14 42 39

Best regards, Annett

Annett7811 avatar Dec 09 '25 14:12 Annett7811

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.

image

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.

ZallaxDev avatar Dec 09 '25 16:12 ZallaxDev