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

fix(NcActions): fix role and aria attributes #4835

Merged
merged 6 commits into from Nov 16, 2023
Merged

Conversation

ShGKme
Copy link
Contributor

@ShGKme ShGKme commented Nov 16, 2023

☑️ Resolves

NcActions and NcAction* items should have correct menu roles only when it represents a menu.

See detailed requirement in the comment here: nextcloud/server#37099 (comment)

🖼️ Screenshots

Example Before After
Application menus +group, +presentation, +label, +checkbox/radio
image image image
image image image
Navigation No changes
image image image
Popovers no wrong roles
image image image

🚧 Tasks

  • Add more examples with use cases to docs
  • NcActionSeparator: add role="separator"
  • NcActionButtonGroup: add role="group" and aria-labelledby
  • NcActionsButton and NcButton:
    - Always set aria-hidden="true" on span.icon in default #icon
    - ⚠️ Deprecate ariaHidden props. Developers don't need to set it manually, it is always needed by default ⚠️
  • NcActions:
    - Change rule to determine when actions has role="menu"
    - Provide NcActions:inSemanticMenu, to NcAction* may know if they are in role="menu"
    - Only in a menu:
    - LI has role="presentation"
    - BUTTON has role="menuitem"
    - In NcActionCheckbox/NcActionRadio:
    - span has role="menuitemcheckbox" or role="menuitemradio"
    - span has correct aria-checked

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
There is no case where icon may not but decorative.

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme self-assigned this Nov 16, 2023
@ShGKme ShGKme added bug Something isn't working 3. to review Waiting for reviews feature: actions Related to the actions components accessibility Making sure we design for the widest range of people possible, including those who have disabilities labels Nov 16, 2023
@ShGKme ShGKme added this to the 8.1.1 milestone Nov 16, 2023
@ShGKme ShGKme marked this pull request as ready for review November 16, 2023 15:30
@ShGKme ShGKme changed the title Fix/nc actions fix roles fix(NcActions): fix role and aria attributes Nov 16, 2023
@susnux susnux merged commit a80f0a3 into master Nov 16, 2023
16 checks passed
@susnux susnux deleted the fix/nc-actions--fix-roles branch November 16, 2023 18:49
@susnux susnux mentioned this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities bug Something isn't working feature: actions Related to the actions components
Projects
None yet
4 participants