Skip to content

Commit 4fd2393

Browse files
authored
Merge pull request #5423 from apostrophecms/a11y-part-3-latest
[latest] A11y fixes part 3
2 parents c82e089 + 0da31d5 commit 4fd2393

31 files changed

Lines changed: 98 additions & 33 deletions

File tree

‎.changeset/itchy-zoos-kick.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"apostrophe": patch
3+
---
4+
5+
Fix more admin UI a11y issues

‎packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposBreadcrumbOperations.vue‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export default {
119119
icon: 'plus-icon',
120120
type: 'group',
121121
modifiers: [ 'small', 'inline' ],
122-
role: 'menuitem',
123122
class: 'apos-area-modify-controls__button',
124123
iconSize: 16,
125124
disableFocus: !this.isFocused

‎packages/apostrophe/modules/@apostrophecms/area/ui/apos/components/AposWidgetControls.vue‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export default {
9090
icon: 'plus-icon',
9191
type: 'group',
9292
modifiers: [ 'small', 'inline' ],
93-
role: 'menuitem',
9493
class: 'apos-area-modify-controls__button',
9594
iconSize: 16,
9695
disableFocus: !this.tabbable

‎packages/apostrophe/modules/@apostrophecms/doc-type/ui/apos/logic/AposDocContextMenu.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ export default {
273273
});
274274
},
275275
moduleName() {
276-
if (apos.modules[this.context.type].action === apos.modules['@apostrophecms/page'].action) {
276+
if (apos.modules[this.context.type]?.action === apos.modules['@apostrophecms/page'].action) {
277277
return '@apostrophecms/page';
278278
}
279279
return this.context.type;
280280
},
281281
moduleOptions() {
282-
return apos.modules[this.moduleName];
282+
return apos.modules[this.moduleName] || {};
283283
},
284284
isUpdateOperation() {
285285
return !!this.context._id;
@@ -482,7 +482,9 @@ export default {
482482
);
483483
},
484484
preview(doc) {
485-
window.open(doc._url, '_blank').focus();
485+
// window.open() returns null when a popup blocker intercepts it,
486+
// so guard before calling focus().
487+
window.open(doc._url, '_blank')?.focus();
486488
},
487489
async copy(doc) {
488490
// If there are changes warn the user before discarding them before

‎packages/apostrophe/modules/@apostrophecms/i18n/i18n/en.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@
205205
"editImageRelationshipTitle": "Adjust Image",
206206
"editRelationship": "Edit Relationship",
207207
"editRelationshipFor": "Edit Relationship for {{ title }}",
208+
"editSubform": "Edit {{ label }}",
208209
"editType": "Edit {{ type }}",
209210
"editWidget": "Edit Widget",
210211
"editWidgetForeignTooltip": "Click to edit this content in its natural context",
@@ -569,6 +570,7 @@
569570
"richTextHighlight": "Mark",
570571
"richTextHorizontalRule": "Horizontal Rule",
571572
"richTextHorizontalRuleDescription": "Add a horizontal separator",
573+
"richTextEditor": "Rich text editor",
572574
"richTextInsertMenuHeading": "Insert element...",
573575
"richTextItalic": "Italic",
574576
"richTextLink": "Link",
@@ -632,6 +634,7 @@
632634
"slugInUse": "Slug already in use",
633635
"someoneElseTookControl": "{{ who }} took control of this document in another tab or window. A document can only be edited in one place at a time.",
634636
"splitCell": "Split Cell",
637+
"status": "Status",
635638
"style": "Style",
636639
"styleAlignment": "Alignment",
637640
"styleBackground": "Background",

‎packages/apostrophe/modules/@apostrophecms/image/ui/apos/components/AposMediaManagerEditor.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
v-if="activeMedia.attachment && activeMedia.attachment._urls"
1515
class="apos-media-editor__thumb"
1616
:src="activeMedia.attachment._urls[restoreOnly ? 'one-sixth' : 'one-third']"
17-
:alt="activeMedia.description"
17+
:alt="activeMedia.description || ''"
1818
>
1919
</div>
2020
<ul class="apos-media-editor__details">
@@ -484,7 +484,7 @@ export default {
484484
485485
& {
486486
line-height: var(--a-line-tallest);
487-
color: var(--a-base-4);
487+
color: var(--a-base-2);
488488
}
489489
}
490490

‎packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridColumn.vue‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
:style="itemStyles"
77
:class="widgetStyles.classes"
88
class="apos-layout__item"
9-
role="gridcell"
109
data-apos-test="aposLayoutItem"
1110
:data-id="item._id"
1211
:data-tablet-full="props.tabletFullItems[item._id] || false"

‎packages/apostrophe/modules/@apostrophecms/layout-widget/ui/apos/components/AposGridManager.vue‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
:key="item._id"
1515
ref="items"
1616
class="apos-layout__item"
17-
role="gridcell"
1817
data-apos-test="aposManageLayoutItem"
1918
:data-id="item._id"
2019
:style="{

‎packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLogin.vue‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<div
1111
v-if="showNav"
1212
class="apos-login__nav"
13+
role="navigation"
1314
>
1415
<a
1516
href="#"
@@ -22,7 +23,13 @@
2223
>{{ $t('apostrophe:loginHome') }}</a>
2324
</div>
2425
</transition>
25-
<div class="apos-login__wrapper">
26+
<div
27+
class="apos-login__wrapper"
28+
role="main"
29+
>
30+
<h1 class="apos-sr-only">
31+
{{ $t('apostrophe:login') }}
32+
</h1>
2633
<transition
2734
name="fade-body"
2835
mode="out-in"
@@ -55,6 +62,7 @@
5562
<div
5663
v-show="loaded"
5764
class="apos-login__footer"
65+
role="contentinfo"
5866
>
5967
<AposLogo class="apos-login__logo" />
6068
<label
@@ -234,7 +242,7 @@ export default {
234242
overflow: hidden;
235243
margin-right: 0;
236244
margin-left: auto;
237-
color: var(--a-base-5);
245+
color: var(--a-base-2);
238246
text-overflow: clip;
239247
white-space: nowrap;
240248
}

‎packages/apostrophe/modules/@apostrophecms/login/ui/apos/components/TheAposLoginHeader.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,16 @@ export default {
112112
text-transform: capitalize;
113113
padding: 6px 12px;
114114
color: var(--a-white);
115-
background: var(--a-success);
115+
background: var(--a-success-dark);
116116
border-radius: 5px;
117117
}
118118
119119
&--development {
120-
background: var(--a-danger);
120+
background: var(--a-danger-button-hover);
121121
}
122122
123123
&--success, &--staging {
124-
background: var(--a-warning);
124+
background: var(--a-warning-dark);
125125
}
126126
}
127127

0 commit comments

Comments
 (0)