Since custom menu items were merged into the primary navigation/more
menu as part of 56c34d71 and related work, the "title" attribute of
each custom menu item was lost.
* Allow the more menu to be rendered as a tablist when needed.
* Let menu_navigation handle keyboard navigation only when
menu items are not rendered as dropdowns. Otherwise, leave
the keyboard navigation handling via the default handlers
(e.g. dropdown.js/aria.js/tab.js).
* When the more menu is rendered as a tablist, use aria-selected
for the selected tab. When it's rendered as a menu, use aria-current
for the selected menu item. (The menuitem role supports aria-current and
not aria-selected)
* Make sure that the active tab is tabbable by default.
* Submenu items should always have tabindex=-1
* Update behat to use css_element instead of xpath. Also, improved it
to consider that it is the active element that should be tabbable.
Co-authored-by: Shamim Rezaie <shamim@moodle.com>
Creates secondary navigation dedicated for the single activity course
format. To accomodate these chanages a new property
'showchildreninsubmenu' is introduced in navigation_node which can be
used to define whether the node's children should be displayed in a
submenu when applicable. Also, new method get_page() is added in
settings_navigation which can be used to get the $page class property.