mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
a11y(filter-editor): label type and operator controls
Associate each fixed select with a stable per-condition label while keeping the compact visual layout unchanged.
This commit is contained in:
1 parent
54b2944dd4
commit
628d5af5f3
2 files changed
+7
No files matched your search
@@ -23,6 +23,7 @@ const emit = defineEmits<{ (e: "remove"): void }>();
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const { confirm } = useConfirm();
|
||||
const fieldId = `filter-node-${useId()}`;
|
||||
const scopeEvents = inject(
|
||||
FILTER_SCOPE_EVENTS,
|
||||
computed((): string[] => []),
|
||||
@@ -141,7 +142,9 @@ async function remove(): Promise<void> {
|
||||
}"
|
||||
>
|
||||
<div class="leaf-type">
|
||||
<label :for="`${fieldId}-type`" class="sr-only">{{ t("routeEditor.filterType") }}</label>
|
||||
<RcSelect
|
||||
:id="`${fieldId}-type`"
|
||||
:model-value="node.leaf.type"
|
||||
:options="typeOptions"
|
||||
@update:model-value="setType"
|
||||
@@ -158,7 +161,9 @@ async function remove(): Promise<void> {
|
||||
/>
|
||||
</div>
|
||||
<div v-if="showOp" class="leaf-op">
|
||||
<label :for="`${fieldId}-op`" class="sr-only">{{ t("routeEditor.op") }}</label>
|
||||
<RcSelect
|
||||
:id="`${fieldId}-op`"
|
||||
:model-value="node.leaf.op"
|
||||
:options="opOptions"
|
||||
:title="t('routeEditor.op')"
|
||||
|
||||
@@ -270,6 +270,7 @@ const en: Dict = {
|
||||
"routeEditor.errDraft": "Add (press Enter) or clear the filter value still being typed",
|
||||
"routeEditor.errInvalidValue": 'Invalid value "{value}": {reason}',
|
||||
"routeEditor.op": "Operator",
|
||||
"routeEditor.filterType": "Filter type",
|
||||
"routeEditor.pathPlaceholder": "payload.path",
|
||||
"routeEditor.valuesPlaceholder": "Type a value and press Enter",
|
||||
"routeEditor.testMatch": "Test match",
|
||||
@@ -702,6 +703,7 @@ const zh: Dict = {
|
||||
"routeEditor.errDraft": "请先确认(回车)或清除尚未添加的过滤值",
|
||||
"routeEditor.errInvalidValue": "无效的值“{value}”:{reason}",
|
||||
"routeEditor.op": "操作符",
|
||||
"routeEditor.filterType": "过滤类型",
|
||||
"routeEditor.pathPlaceholder": "payload.path",
|
||||
"routeEditor.valuesPlaceholder": "输入值后回车",
|
||||
"routeEditor.testMatch": "测试匹配",
|
||||
|
||||
Reference in new issue
Block a user