From 1fc6056c513fbbaaab43bd9ae7b47ae186181c6a Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Fri, 26 Jan 2024 14:55:13 -0800 Subject: [PATCH] Set disabled items to use disabled property (#7342) * Closes #7322 - New CSS for `aria-disabled = true` property. - Changed multiple items to use aria-disabled instead of .disabled, including: - Action menu - Super menu - Notebook drag area - Tree item style modded to only italicize when is-navigated and is being edited. * Closes #7322 - New CSS for `aria-disabled = true` property. - Changed multiple items to use aria-disabled instead of .disabled, including: - Action menu - Super menu - Notebook drag area - Tree item style modded to only italicize when is-navigated and is being edited. - Create button sets itself to `disabled` when the editor is in use. * Closes #7322 - Create button now _actually_ sets itself to `aria-disabled` when the editor is in use. - CSS removes selector for `.is-editing`. * fix conflict --------- Co-authored-by: John Hill --- src/api/menu/components/MenuComponent.vue | 6 ++++-- src/api/menu/components/SuperMenu.vue | 3 ++- src/plugins/notebook/components/NotebookComponent.vue | 2 +- src/styles/_global.scss | 3 ++- src/ui/layout/CreateButton.vue | 11 +++++++++++ src/ui/layout/create-button.scss | 4 ---- src/ui/layout/mct-tree.scss | 2 -- 7 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/api/menu/components/MenuComponent.vue b/src/api/menu/components/MenuComponent.vue index 60b49b5bfc..d7d334f58b 100644 --- a/src/api/menu/components/MenuComponent.vue +++ b/src/api/menu/components/MenuComponent.vue @@ -28,7 +28,8 @@ v-for="action in actionGroups" :key="action.name" role="menuitem" - :class="[action.cssClass, action.isDisabled ? 'disabled' : '']" + :aria-disabled="action.isDisabled" + :class="action.cssClass" :aria-label="action.name" :title="action.description" @click="action.onItemClicked" @@ -51,7 +52,8 @@ v-for="action in options.actions" :key="action.name" role="menuitem" - :class="[action.cssClass, action.isDisabled ? 'disabled' : '']" + :aria-disabled="action.isDisabled" + :class="action.cssClass" :aria-label="action.name" :title="action.description" @click="action.onItemClicked" diff --git a/src/api/menu/components/SuperMenu.vue b/src/api/menu/components/SuperMenu.vue index 606fe0b3e7..1bbdaf940e 100644 --- a/src/api/menu/components/SuperMenu.vue +++ b/src/api/menu/components/SuperMenu.vue @@ -37,7 +37,8 @@ v-for="action in actionGroups" :key="action.name" role="menuitem" - :class="[action.cssClass, action.isDisabled ? 'disabled' : '']" + :aria-disabled="action.isDisabled" + :class="action.cssClass" :title="action.description" @click="action.onItemClicked" @mouseover="toggleItemDescription(action)" diff --git a/src/plugins/notebook/components/NotebookComponent.vue b/src/plugins/notebook/components/NotebookComponent.vue index ccb1276276..4c2d7a4c02 100644 --- a/src/plugins/notebook/components/NotebookComponent.vue +++ b/src/plugins/notebook/components/NotebookComponent.vue @@ -96,7 +96,7 @@