Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use ILIAS\UI\Component\MainControls\Footer;
use ILIAS\UI\Component\MainControls\MainBar;
use ILIAS\UI\Component\MainControls\MetaBar;
use ILIAS\UI\Component\MainControls\Slate\Legacy as LegacySlate;
use ILIAS\UI\Component\MainControls\Slate\Slate;
use ILIAS\UI\Component\Signal;
use ILIAS\UI\Implementation\Component\Button\Bulky as IBulky;
Expand Down Expand Up @@ -166,7 +167,8 @@ function ($id) use ($js, $mb_id, $k, $is_tool): string {
$tpl->parseCurrentBlock();

if ($slate) {
$entry = $entry->withAriaRole(ISlate::MENU);
$aria_role = ($entry instanceof LegacySlate) ? ISlate::NAVIGATION : ISlate::MENU;
$entry = $entry->withAriaRole($aria_role);

$tpl->setCurrentBlock("slate_item");
$tpl->setVariable("SLATE", $default_renderer->render($entry));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ abstract class Slate implements ISlate\Slate

// allowed ARIA roles
public const MENU = 'menu';
public const NAVIGATION = 'navigation';

/**
* @var string[]
*/
protected static array $allowed_aria_roles = array(
self::MENU
self::MENU,
self::NAVIGATION
);

protected string $name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public function testRendering(): void
<div class="il-maincontrols-slate disengaged" id="id_10" data-depth-level="1" role="menu">
<div class="il-maincontrols-slate-content" data-replace-marker="content"></div>
</div>
<div class="il-maincontrols-slate disengaged" id="id_13" data-depth-level="1" role="menu">
<div class="il-maincontrols-slate disengaged" id="id_13" data-depth-level="1" role="navigation">
<div class="il-maincontrols-slate-content" data-replace-marker="content">Help</div>
</div>
<div class="il-mainbar-close-slates">
Expand Down