Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a11y: Improve accessibility of dropdown menus #8638

Merged
merged 16 commits into from
Nov 8, 2019
Merged

a11y: Improve accessibility of dropdown menus #8638

merged 16 commits into from
Nov 8, 2019

Commits on Oct 22, 2019

  1. Configuration menu
    Copy the full SHA
    fe4d766 View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2019

  1. js: Set tabindex=-1 on dropdown items

    Setting tabindex=-1 on focusable elements within dropdown menus allows
    the user to treat dropdown menus as a single focusable item with its own
    internal navigation using arrow keys.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    0f14862 View commit details
    Browse the repository at this point in the history
  2. js: Don't use jQuery to click menu items

    Menu items are often <a> elements, which jQuery refuses to trigger click
    events on. Instead it just bubbles up to the menu.
    
    Using HTMLElement's click method fixes this and makes menu items
    clickable from the keyboard using dropdown menus.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    96f24ca View commit details
    Browse the repository at this point in the history
  3. js: Set correct ARIA 1.1 roles on dropdown menus

    Setting role= makes assistive technology aware there is a widget here.
    In this case, Orca will now exit browse mode and allow us to capture
    keydown events when focused on a dropdown menu. It will also inform the
    user that there's a menu focused.
    
    Since dropdowns can be used in multiple elements each with different
    ARIA roles, a guessRole method is used to find the correct role.
    All roles I consider possible are listed, but only menu is implemented.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    2c0b99b View commit details
    Browse the repository at this point in the history
  4. js: Set aria-expanded when dropdown menus show and hide

    This is deliberately done before the transition finishes so that screen
    readers get immediate feedback.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    8681f61 View commit details
    Browse the repository at this point in the history
  5. js: Set aria-label or aria-labelledby on dropdown menus

    This makes dropdown menu buttons screen reader accessible.
    
    aria-labelledby refers to an element using an ID, so the chosen labels
    are now assigned a unique ID- This ID is not stable, do not refer to it
    with user scripts.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    1e5f8f1 View commit details
    Browse the repository at this point in the history
  6. js: Set aria-activedescendant on dropdown menus

    As the menus grab focus and navigate by tracking a 'selected' div class,
    assistive technology has no idea that what the current selection is.
    
    Assign IDs to each menu item and set aria-activedescendant to the ID of
    the currently selected menu item.
    
    When the menu is unfocused, remove aria-activedescendant- This isn't
    neccessary but in my experience it triggers Orca to remind the user of
    their current selection when re-focusing the menu.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    a26f7fd View commit details
    Browse the repository at this point in the history
  7. Makefile: Make eslint ignore semantic.dropdown.js

    This file is taken from Semantic UI which isn't linted upstream.
    Ignore it as we won't fix these issues.
    Jookia committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    03984cd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7457106 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2019

  1. Configuration menu
    Copy the full SHA
    ff52149 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2019

  1. Add Md5 AppVer to templates/base/footer.tmpl

    Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
    Jookia and guillep2k authored Oct 29, 2019
    Configuration menu
    Copy the full SHA
    534c5be View commit details
    Browse the repository at this point in the history
  2. Add Md5 AppVer to templates/pwa/serviceworker_js.tmpl

    Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
    Jookia and guillep2k authored Oct 29, 2019
    Configuration menu
    Copy the full SHA
    98030f1 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2019

  1. Configuration menu
    Copy the full SHA
    8c61b2b View commit details
    Browse the repository at this point in the history
  2. Use eslintignore

    Jookia committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    315181e View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2019

  1. remove bogus submodule

    Jookia committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    446e042 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2019

  1. Configuration menu
    Copy the full SHA
    a9d856e View commit details
    Browse the repository at this point in the history