ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

Fix(Accessibility): Add aria-modal and aria-labelledby to UI Modals.

Open ZallaxDev opened this issue 1 month ago • 1 comments

Fixes a WCAG violation by adding aria-modal="true" and aria-labelledby="{ID}_title" to the <dialog> element in all core modal templates. The corresponding id="{ID}_title" is also added to the modal's <h1> title.

This ensures screen readers properly announce the modal's purpose and correctly treat it as a priority overlay.

⚠️ This change currently does not pass the PHP Unit Tests, because they modify the HTML generated in these tests. To optimise time, we want to be sure that the implementation is correct, since if any additional changes are required, the tests will have to be updated again, with the corresponding time expenditure on this task. Therefore, we would appreciate feedback on these changes, and when we can confirm that they are adequate, we will update the tests in this same PR before performing the merge.

Ticket 43962

ZallaxDev avatar Nov 19 '25 11:11 ZallaxDev

Hello @ZallaxDev. Thank you very much for your contribution and your PR. Please also provide PRs for releases 9, 11 and the trunk. Please have a look to the failed checks. Many thanks for your support. Best regards, @oliversamoila

oliversamoila avatar Dec 08 '25 08:12 oliversamoila