Skip to content

[Fix] 0047059 UI: Use role="navigation" for LegacySlate in MainBar#11014

Merged
thibsy merged 4 commits intoILIAS-eLearning:release_11from
fhelfer:ui/mantis/47059
Mar 13, 2026
Merged

[Fix] 0047059 UI: Use role="navigation" for LegacySlate in MainBar#11014
thibsy merged 4 commits intoILIAS-eLearning:release_11from
fhelfer:ui/mantis/47059

Conversation

@fhelfer
Copy link
Contributor

@fhelfer fhelfer commented Jan 30, 2026

Error: An “li” element that is a descendant of a “role=menu” element or “role=menubar” element must not have any “role” value other than “group”, “menuitem”, “menuitemcheckbox”, “menuitemradio”, or “separator”.
https://mantis.ilias.de/view.php?id=47059

ARIA forbids role="treeitem" inside role="menu". For LegacySlates
(e.g. tree tools) use role="navigation" instead of "menu". Add
NAVIGATION to allowed Slate ARIA roles and set it in Renderer when
entry is LegacySlate. Adjust MainBarTest for LegacySlate expectation.

Problem

  • Validator/ARIA: <li role="treeitem"> innerhalb von role="menu" ist ungültig (z. B. Tree-Tools in der MainBar).

Lösung

  • Slate: NAVIGATION als erlaubte ARIA-Rolle ergänzt.
  • MainControls-Renderer: Bei LegacySlate (z. B. Tree-Tools) role="navigation" statt "menu" setzen.
  • MainBarTest: Für LegacySlate (Help-Tool) role="navigation" erwarten.

@Annett7811 Annett7811 added the accessibility Pull requests that propose A11Y changes. label Feb 6, 2026
Copy link

@Annett7811 Annett7811 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello!

From an accessibility perspective, this looks good. Thank you very much for your work.

Best regards,

Annett

Copy link
Contributor

@oliversamoila oliversamoila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello together,
from an UX and UI perspective, the result looks good. Thank you very much for your contribution, @fhelfer.
I'm forwarding this to @thibsy for code review. He may contact you with change requests or incorporate the changes directly (That includes cherry picking too.)

Kind regards,
@oliversamoila (as UI coordinator)

Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fhelfer,

Thx a lot for your contribution to the UI framework!

Please implement the following changes:

  • role attribute: I actually think its best to remove the attribute completely from our MainControls\Slate\Legacy component, since it can hold arbitrary HTML content. Its not safe to say if navigation is appropriate here.

Kind regards,
@thibsy (as UI coordinator)

@fhelfer
Copy link
Contributor Author

fhelfer commented Mar 10, 2026

role removed for Legacy Slates

@fhelfer fhelfer requested a review from thibsy March 10, 2026 09:15
Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fhelfer, thx for implementing the requested changes. There are some left-overs of the newly added role inside the Slate\Slate. Please remove this as well. Thx!

@fhelfer fhelfer requested a review from thibsy March 13, 2026 09:49
Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx a lot @fhelfer!

@thibsy thibsy merged commit 8e89396 into ILIAS-eLearning:release_11 Mar 13, 2026
5 checks passed
thibsy pushed a commit that referenced this pull request Mar 13, 2026
…te. (#11014)

* Fixes https://mantis.ilias.de/view.php?id=47059
* Removes the `aria-role` attribute because we cannot safely tell what content is held by a legacy slate. Its content is of type `Component\Legacy` which holds arbitrary HTML.
thibsy pushed a commit that referenced this pull request Mar 13, 2026
…te. (#11014)

* Fixes https://mantis.ilias.de/view.php?id=47059
* Removes the `aria-role` attribute because we cannot safely tell what content is held by a legacy slate. Its content is of type `Component\Legacy` which holds arbitrary HTML.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Pull requests that propose A11Y changes. bugfix kitchen sink php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants