Adds arial label to all modal close buttons due to Buefy new feature.

This commit is contained in:
mateuswetah 2021-11-04 16:40:41 -03:00
parent b27c19576e
commit 39de46de94
34 changed files with 122 additions and 62 deletions

9
package-lock.json generated
View File

@ -2428,9 +2428,9 @@
}
},
"buefy": {
"version": "0.9.10",
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.10.tgz",
"integrity": "sha512-xXEoy/NTgBNiIfBTCdHi2Vu5SJJdB046py6ekUvYuUgYwRvulySZksdecVNNWdfEVU8iD4esZaRbTLwCegFcVQ==",
"version": "0.9.11",
"resolved": "https://registry.npmjs.org/buefy/-/buefy-0.9.11.tgz",
"integrity": "sha512-WP32SiaM9WVxDtzgdiq7V2zyIvn41NboPgluVqdB6OAi1/QhjO/63m6hd/jy6Vk8r+zuhIZD+aP9KlQ10EhxTQ==",
"requires": {
"bulma": "0.9.3"
}
@ -4891,7 +4891,8 @@
},
"ini": {
"version": "1.3.5",
"resolved": "",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"dev": true,
"optional": true
},

View File

@ -11,7 +11,7 @@
"apexcharts": "^3.29.0",
"axios": "^0.21.4",
"blurhash": "^1.1.3",
"buefy": "^0.9.10",
"buefy": "^0.9.11",
"bulma": "^0.9.3",
"conditioner-core": "^2.3.3",
"countup.js": "^2.0.8",

View File

@ -111,7 +111,8 @@
},
ariaRole: 'alertdialog',
ariaModal: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
}
});

View File

@ -209,6 +209,7 @@
trap-focus
aria-modal
aria-role="dialog"
:close-button-aria-label="$i18n.get('close')"
custom-class="tainacan-modal">
<div
autofocus="true"
@ -296,6 +297,7 @@
:width="820"
scroll="keep"
trap-focus
:close-button-aria-label="$i18n.get('close')"
autofocus
role="dialog"
tabindex="-1"

View File

@ -331,7 +331,8 @@ export default {
},
width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
deleteOneItem(itemId, index) {
@ -353,7 +354,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
}

View File

@ -555,7 +555,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2>{{ $i18n.get('label_thumbnail_alt') }}</h2>
@ -593,7 +594,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2>{{ $i18n.get('instruction_write_text') }}</h2>
@ -635,7 +637,8 @@
tabindex="-1"
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2>{{ $i18n.get('instruction_insert_url') }}</h2>
@ -1174,7 +1177,8 @@ export default {
},
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else {
next()
@ -1558,7 +1562,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
@ -1681,7 +1686,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
loadExistingItem() {

View File

@ -300,7 +300,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else if (this.isEditingTerm) {
this.$buefy.modal.open({
@ -315,7 +316,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else {
next();

View File

@ -206,7 +206,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
}

View File

@ -320,7 +320,8 @@
},
width: 'calc(100% - (4 * var(--tainacan-one-column)))',
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
prepareOptionsForTaxonomy(items) {

View File

@ -184,7 +184,8 @@
notApproveActivity: (activityId) => this.notApproveActivity(activityId)
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
}

View File

@ -104,7 +104,8 @@ export default {
onConfirm: () => { this.removeTerm(); },
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else {
this.removeTerm();
@ -126,7 +127,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
eventOnEditTerm() {

View File

@ -144,7 +144,8 @@
capabilityKey: capabilityKey
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
getCompleteRolesList(roles, rolesInherited) {

View File

@ -448,7 +448,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
this.clearContextMenu();
},
@ -489,7 +490,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
openCollection() {

View File

@ -1447,7 +1447,8 @@ export default {
},
width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
sequenceEditSelectedItems() {
@ -1486,7 +1487,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
this.clearContextMenu();
@ -1519,7 +1521,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
deleteOneItem(itemId) {
@ -1543,7 +1546,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
this.clearContextMenu();
},
@ -1576,7 +1580,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
deleteSelectedItems() {
@ -1618,7 +1623,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
openItem() {

View File

@ -151,7 +151,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div
autofocus
role="dialog"

View File

@ -415,7 +415,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
deleteSelected() {
@ -455,7 +456,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
getDate(rawDate) {

View File

@ -236,7 +236,8 @@ export default {
onConfirm: () => { this.removeTerm(); },
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else {
this.removeTerm();
@ -279,7 +280,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
eventOnChildTermDeleted(parentTermId) {

View File

@ -132,7 +132,8 @@
:width="1200"
:active.sync="editItemModal"
@close="reloadRelatedItems"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<iframe
width="100%"
style="height: 85vh"

View File

@ -308,7 +308,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
deleteSelected() {
@ -348,7 +349,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
onClickTaxonomy($event, taxonomyId, index) {

View File

@ -181,7 +181,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<metadatum-edition-form
:collection-id="collectionId"
:original-metadatum="metadatum"
@ -350,7 +351,8 @@
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
toggleMetadatumEdition(metadatumId) {

View File

@ -122,7 +122,8 @@
<b-modal
:width="1200"
:active.sync="editItemModalOpen"
:custom-class="'tainacan-modal' + (collection && collection.id ? ' tainacan-modal-item-edition--collection-' + collection.id : '')">
:custom-class="'tainacan-modal' + (collection && collection.id ? ' tainacan-modal-item-edition--collection-' + collection.id : '')"
:close-button-aria-label="$i18n.get('close')">
<iframe
:id="relationshipInputId + '_item-edition-modal'"
width="100%"

View File

@ -52,7 +52,8 @@
aria-role="dialog"
aria-modal
:can-cancel="['outside', 'escape']"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<term-edition-form
:taxonomy-id="taxonomyId"
:edit-form="{ id: 'new', name: newTermName ? newTermName : '' }"

View File

@ -136,7 +136,8 @@ export default {
hideWhenManualCollection: true
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
}
}

View File

@ -18,7 +18,8 @@
aria-modal
aria-role="dialog"
:append-to-body="true"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<!-- <div class="tainacan-modal-content">
<div class="tainacan-modal-title">
<h2>{{ $i18n.get('label_document') }}</h2>

View File

@ -36,7 +36,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div
autofocus
role="dialog"

View File

@ -188,7 +188,8 @@
},
width: 'calc(100% - (2 * var(--tainacan-one-column)))',
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
this.$parent.close();

View File

@ -51,7 +51,8 @@ const tainacanErrorHandler = function(error){
},
ariaRole: 'alertdialog',
ariaModal: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: i18nGet('close')
});
}
});

View File

@ -563,7 +563,8 @@ export default {
component: AvailableImportersModal,
hasModalCard: true,
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
searchCollections() {

View File

@ -317,7 +317,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<div
autofocus
role="dialog"
@ -476,7 +477,8 @@ export default {
},
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
} else {
next()

View File

@ -441,7 +441,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal tainacan-form filters-menu">
custom-class="tainacan-modal tainacan-form filters-menu"
:close-button-aria-label="$i18n.get('close')">
<filters-items-list
:is-loading-items="isLoadingItems"
autofocus="true"
@ -899,7 +900,8 @@
hideWhenManualCollection: true
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
openExposersModal(selectedItems) {
@ -913,7 +915,8 @@
selectedItems: selectedItems
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
})
},
onOpenCollectionsModal() {
@ -922,7 +925,8 @@
component: CollectionsModal,
hasModalCard: true,
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
updateSearch() {
@ -1264,7 +1268,8 @@
messageKeyForUserPrefs: 'ItemsHiddenDueSorting'
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
hideFiltersOnMobile: _.debounce( function() {

View File

@ -273,7 +273,8 @@
trap-focus
aria-modal
aria-role="dialog"
custom-class="tainacan-modal">
custom-class="tainacan-modal"
:close-button-aria-label="$i18n.get('close')">
<metadatum-edition-form
:collection-id="collectionId"
:original-metadatum="metadatum"
@ -568,7 +569,8 @@ export default {
}
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
toggleMetadatumEdition(metadatum) {

View File

@ -531,7 +531,8 @@
totalItems: 1,
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
}
}

View File

@ -631,6 +631,7 @@ export default {
ariaRole: 'alertdialog',
ariaModal: true,
customClass: 'tainacan-modal slides-help-modal',
closeButtonAriaLabel: this.$i18n.get('close'),
onCancel: () => {
setTimeout(() => document.documentElement.classList.add('is-clipped'), 500);
}

View File

@ -411,7 +411,8 @@
:trap-focus="filtersAsModal"
full-screen
:custom-class="'tainacan-modal tainacan-form filters-menu' + (filtersAsModal ? ' filters-menu-modal' : '')"
:can-cancel="hideHideFiltersButton || !filtersAsModal ? ['x', 'outside'] : ['x', 'escape', 'outside']">
:can-cancel="hideHideFiltersButton || !filtersAsModal ? ['x', 'outside'] : ['x', 'escape', 'outside']"
:close-button-aria-label="$i18n.get('close')">
<filters-items-list
:is-loading-items="isLoadingItems"
:autofocus="filtersAsModal"
@ -891,7 +892,8 @@
totalItems: this.totalItems
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
updateSearch() {
@ -1184,7 +1186,8 @@
messageKeyForUserPrefs: 'ItemsHiddenDueSorting'
},
trapFocus: true,
customClass: 'tainacan-modal'
customClass: 'tainacan-modal',
closeButtonAriaLabel: this.$i18n.get('close')
});
},
hideFiltersOnMobile: _.debounce( function() {