some markup changes to improve testability

This commit is contained in:
Andrew Henry 2025-05-12 16:23:38 -07:00
parent 8d6bbb8e5f
commit b116957ba8
2 changed files with 16 additions and 3 deletions

View File

@ -24,7 +24,7 @@
<div
class="c-condition-h"
:class="{ 'is-drag-target': draggingOver }"
aria-label="Condition Set Condition"
:aria-label="conditionSetLabel"
@dragover.prevent
@drop.prevent="dropCondition($event, conditionIndex)"
@dragenter="dragEnter($event, conditionIndex)"
@ -53,7 +53,9 @@
@click="expanded = !expanded"
></span>
<span class="c-condition__name">{{ condition.configuration.name }}</span>
<span class="c-condition__name" aria-label="Condition Name Label">{{
condition.configuration.name
}}</span>
<span class="c-condition__summary">
<template v-if="!condition.isDefault && !canEvaluateCriteria"> Define criteria </template>
<span v-else>
@ -259,6 +261,17 @@ export default {
};
},
computed: {
conditionSetLabel() {
let label;
if (this.condition.id === this.currentConditionId) {
label = 'Active Condition Set Condition';
} else {
label = 'Condition Set Condition';
}
return label;
},
triggers() {
const keys = Object.keys(TRIGGER);
const triggerOptions = [];

View File

@ -114,7 +114,7 @@
class="c-button c-button--major icon-plus labeled"
@click="addTestInput"
>
<span class="c-cs-button__label">Add Test Datum</span>
<span class="c-cs-button__label" aria-label="Add Test Datum">Add Test Datum</span>
</button>
</div>
</section>