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

[stable28] fix(menubar): menubar and table menus a11y #5330

Merged
merged 12 commits into from Feb 1, 2024

Commits on Feb 1, 2024

  1. fix: apply a11y attrs for session list trigger

    - Migrate from deprecated slot syntax
    - Use a11y attrs from `NcPopover` on a custom button
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    52df535 View commit details
    Browse the repository at this point in the history
  2. fix(menubar): remove unneeded roles menu, menuitem

    All these roles are correctly set by `NcAction*` components when needed.
    Setting these roles in mixins and menu bar puts them on wrong elements.
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    564e282 View commit details
    Browse the repository at this point in the history
  3. fix(menubar): remove incorrect aria-haspopup

    - It must have string `"true"/"menu"` value
    - It must be placed on the `button` itself
    - It is already correctly set by `NcActions` and `NcPopover`
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    8085f07 View commit details
    Browse the repository at this point in the history
  4. fix(menubar): remove incorrect aria-activedescendant

    - `aria-activedescendant` should identify a visually focused element when the real focus remains on this element.
      In the current implementation it identified selected element (even when the menu is closed), not the focused.
    - `aria-activedescendant` is not needed because NcAction has actual focus anyway.
      In case it will be actually needed, it should be implemented in the `NcActions`
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    2c0434b View commit details
    Browse the repository at this point in the history
  5. fix(table): replace InlineActionsContainer by NcActionButtonGroup

    It has the same styles and correct a11y attributes.
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    0ba5204 View commit details
    Browse the repository at this point in the history
  6. fix(table): make text align buttons radio

    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    cfcf05a View commit details
    Browse the repository at this point in the history
  7. fix(menubar): replace aria-pressed with text description in action list

    - `aria-pressed` is not valid for a menu trigger button
    - As alternative solution - show that there is a selected value directly in the text
    - Remove incorrect prop for NcActions
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    55b44fc View commit details
    Browse the repository at this point in the history
  8. refactor: implement ActionSingle via template instead of render-function

    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    d4b7975 View commit details
    Browse the repository at this point in the history
  9. fix(menubar): set correct type for buttons instead of aria-selected

    - Since `@nextcloud/vue@8.6.0` correct attributes are covered by `NcAction*` and `NcButton` components, including fixes:
      - Attribute should display not only active `attr="true"` state, but also non-active `attr="false"`
      - It should be `aria-pressed` for buttons and `aria-checked` for menu items instead of `aria-selected`
    - Set correct `type` and active state
      - `type="radio"` for a list of options like `Heading`
      - `type="checkbox"` for toggle buttons like `Bold`
      - `type="button"` for general buttons widhout active state like `Undo`
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    82f6d12 View commit details
    Browse the repository at this point in the history
  10. fix(menubar): separate NcActionButton from ActionSingle

    - ActionSingle was used in 2 places:
      1. As a single button in the menu
      2. As an item in NcActions
    - NcActions doesn't fully support non-direct NcAction* children
    - Move NcActionButton usage from ActionSingle to a new component
    - This new component is named NcActionButton so that NcActions will consider it to be a valid NcAction* component
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    e527752 View commit details
    Browse the repository at this point in the history
  11. fix(menubar): add separator between radio groups

    - Separates different parts visually
    - Required for a11y to group radio button in the menu
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    42741b8 View commit details
    Browse the repository at this point in the history
  12. fix(menubar): name ActionFormattingHelp as NcActionButton to support …

    …NcActions
    
    Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
    ShGKme authored and backportbot[bot] committed Feb 1, 2024
    Copy the full SHA
    633c543 View commit details
    Browse the repository at this point in the history