Skip to content
  • Martin Kutschker's avatar
    [FEATURE] Improve keyboard navigation for module menus · e3d34dd5
    Martin Kutschker authored and Richard Haeser's avatar Richard Haeser committed
    The module menu implements the keyboard navigation suggested
    by the ARIA Best Practices 1.1 for roles "menubar" and "menu".
    The first level menu has a "menubar" role, the second level
    submenus have a "menu" role. The buttons have the "menuitem"
    role. Both the "menubar" and the "menu" are oriented
    vertically for assistive technology matching the visual
    representation which affects the keyboard navigation.
    
    Space/Enter show the module unless the item has a submenu.
    Space/Enter and Right Arrow open a submenu and move focus to
    the first item.
    
    Up/Down Arrow and Home/End navigate within the current
    level of the menu.
    Ctrl + Home/End navigate within the first level of the menu
    (extension of the ARIA pattern).
    
    Left/Right Arrow moves to the parent item's predecessor/successor
    when on a submodule item. The submenu will not be closed
    (deviation from the ARIA pattern).
    
    Escape moves to the parent item of a submodule item.
    The submenu will not be closed (deviation from the ARIA pattern).
    
    Tab and Shift + Tab move to the next item outside of the
    module menu.
    
    The help menu implements the keyboard navigation suggested
    by the ARIA Best Practices 1.1 for the role "menu". This
    is the same as the module menu but limited to a single level.
    
    The change detaches again the module menu's event listener
    from the document as in #91642, but reinitializes
    the event listeners to handle situations as described in #93008
    properly.
    
    Resolves: #92704
    Resolves: #92634
    Resolves: #92613
    Releases: master
    Change-Id: I58ae5caa81882ccebd4e2ae2d944eb99e15a4b18
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66283
    
    
    Tested-by: default avatarTYPO3com <noreply@typo3.com>
    Tested-by: default avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
    Tested-by: default avatarGuido Schmechel <guido.schmechel@brandung.de>
    Tested-by: default avatarRichard Haeser <richard@richardhaeser.com>
    Reviewed-by: default avatarMichael Telgkamp <michael.telgkamp@mindscreen.de>
    Reviewed-by: default avatarRichard Haeser <richard@richardhaeser.com>
    e3d34dd5