diff --git a/.changeset/itchy-zoos-kick.md b/.changeset/itchy-zoos-kick.md new file mode 100644 index 0000000000..2d0bf3e421 --- /dev/null +++ b/.changeset/itchy-zoos-kick.md @@ -0,0 +1,5 @@ +--- +"apostrophe": patch +--- + +Fix more admin UI a11y issues diff --git a/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposBreadcrumbOperations.vue b/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposBreadcrumbOperations.vue index 46f6c7851e..2ecb0e1b0e 100644 --- a/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposBreadcrumbOperations.vue +++ b/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposBreadcrumbOperations.vue @@ -119,7 +119,6 @@ export default { icon: 'plus-icon', type: 'group', modifiers: [ 'small', 'inline' ], - role: 'menuitem', class: 'apos-area-modify-controls__button', iconSize: 16, disableFocus: !this.isFocused diff --git a/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue b/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue index 8745ae5d2c..9c282b691b 100644 --- a/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue +++ b/packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue @@ -90,7 +90,6 @@ export default { icon: 'plus-icon', type: 'group', modifiers: [ 'small', 'inline' ], - role: 'menuitem', class: 'apos-area-modify-controls__button', iconSize: 16, disableFocus: !this.tabbable diff --git a/packages/apostrophe/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js b/packages/apostrophe/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js index 12e5ddfe86..e766ba75cb 100644 --- a/packages/apostrophe/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js +++ b/packages/apostrophe/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js @@ -273,13 +273,13 @@ export default { }); }, moduleName() { - if (apos.modules[this.context.type].action === apos.modules['@apostrophecms/page'].action) { + if (apos.modules[this.context.type]?.action === apos.modules['@apostrophecms/page'].action) { return '@apostrophecms/page'; } return this.context.type; }, moduleOptions() { - return apos.modules[this.moduleName]; + return apos.modules[this.moduleName] || {}; }, isUpdateOperation() { return !!this.context._id; @@ -482,7 +482,9 @@ export default { ); }, preview(doc) { - window.open(doc._url, '_blank').focus(); + // window.open() returns null when a popup blocker intercepts it, + // so guard before calling focus(). + window.open(doc._url, '_blank')?.focus(); }, async copy(doc) { // If there are changes warn the user before discarding them before diff --git a/packages/apostrophe/modules/@apostrophecms/i18n/i18n/en.json b/packages/apostrophe/modules/@apostrophecms/i18n/i18n/en.json index 0adcf393d2..e93b9a68f8 100644 --- a/packages/apostrophe/modules/@apostrophecms/i18n/i18n/en.json +++ b/packages/apostrophe/modules/@apostrophecms/i18n/i18n/en.json @@ -205,6 +205,7 @@ "editImageRelationshipTitle": "Adjust Image", "editRelationship": "Edit Relationship", "editRelationshipFor": "Edit Relationship for {{ title }}", + "editSubform": "Edit {{ label }}", "editType": "Edit {{ type }}", "editWidget": "Edit Widget", "editWidgetForeignTooltip": "Click to edit this content in its natural context", @@ -569,6 +570,7 @@ "richTextHighlight": "Mark", "richTextHorizontalRule": "Horizontal Rule", "richTextHorizontalRuleDescription": "Add a horizontal separator", + "richTextEditor": "Rich text editor", "richTextInsertMenuHeading": "Insert element...", "richTextItalic": "Italic", "richTextLink": "Link", @@ -632,6 +634,7 @@ "slugInUse": "Slug already in use", "someoneElseTookControl": "{{ who }} took control of this document in another tab or window. A document can only be edited in one place at a time.", "splitCell": "Split Cell", + "status": "Status", "style": "Style", "styleAlignment": "Alignment", "styleBackground": "Background", diff --git a/packages/apostrophe/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue b/packages/apostrophe/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue index b6598bcaa1..46eba052d1 100644 --- a/packages/apostrophe/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue +++ b/packages/apostrophe/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue @@ -14,7 +14,7 @@ v-if="activeMedia.attachment && activeMedia.attachment._urls" class="apos-media-editor__thumb" :src="activeMedia.attachment._urls[restoreOnly ? 'one-sixth' : 'one-third']" - :alt="activeMedia.description" + :alt="activeMedia.description || ''" >
    @@ -484,7 +484,7 @@ export default { & { line-height: var(--a-line-tallest); - color: var(--a-base-4); + color: var(--a-base-2); } } diff --git a/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridColumn.vue b/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridColumn.vue index 87ff04278a..8b13324d76 100644 --- a/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridColumn.vue +++ b/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridColumn.vue @@ -6,7 +6,6 @@ :style="itemStyles" :class="widgetStyles.classes" class="apos-layout__item" - role="gridcell" data-apos-test="aposLayoutItem" :data-id="item._id" :data-tablet-full="props.tabletFullItems[item._id] || false" diff --git a/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridManager.vue b/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridManager.vue index e776b9aab8..f7dc396f71 100644 --- a/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridManager.vue +++ b/packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridManager.vue @@ -14,7 +14,6 @@ :key="item._id" ref="items" class="apos-layout__item" - role="gridcell" data-apos-test="aposManageLayoutItem" :data-id="item._id" :style="{ diff --git a/packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue b/packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue index 1bb2223ff3..a22a2a86bf 100644 --- a/packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue +++ b/packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue @@ -10,6 +10,7 @@
    {{ $t('apostrophe:loginHome') }}
    -
    +
    +

    + {{ $t('apostrophe:login') }} +