From 1170f25ebfa1219c302a96eca9c0eb2338fe77ee Mon Sep 17 00:00:00 2001 From: "Milos Brzakovic (E-Search)" Date: Fri, 26 Nov 2021 13:17:19 +0100 Subject: [PATCH] plus, add --- data/core.yaml | 2 ++ modules/ui/fields/localized.js | 1 + modules/ui/sections/raw_membership_editor.js | 3 ++- modules/ui/sections/raw_tag_editor.js | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 8b46f578a..0fbfe29c4 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -17,6 +17,7 @@ en: backward: backward expand: expand collapse: collapse + plus: add toolbar: inspect: Inspect undo_redo: Undo / Redo @@ -707,6 +708,7 @@ en: features: Features title_count: "{title} ({count})" add_to_relation: Add to a relation + add_to_tag: Add a tag new_relation: New relation... choose_relation: Choose a parent relation role: Role diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index 8b9a76b88..b53bdfd37 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -185,6 +185,7 @@ export function uiFieldLocalized(field, context) { translateButton = translateButton.enter() .append('button') .attr('class', 'localized-add form-field-button') + .attr('aria-label', t('icons.plus')) .call(svgIcon('#iD-icon-plus')) .merge(translateButton); diff --git a/modules/ui/sections/raw_membership_editor.js b/modules/ui/sections/raw_membership_editor.js index 9dc566835..b25ef2a48 100644 --- a/modules/ui/sections/raw_membership_editor.js +++ b/modules/ui/sections/raw_membership_editor.js @@ -461,7 +461,8 @@ export function uiSectionRawMembershipEditor(context) { var addRelationButton = addRowEnter .append('button') - .attr('class', 'add-relation'); + .attr('class', 'add-relation') + .attr('aria-label', t('inspector.add_to_relation')); addRelationButton .call(svgIcon('#iD-icon-plus', 'light')); diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index 055b58672..357eb3bee 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -7,9 +7,10 @@ import { uiCombobox } from '../combobox'; import { uiSection } from '../section'; import { uiTagReference } from '../tag_reference'; import { prefs } from '../../core/preferences'; -import { t } from '../../core/localizer'; +import { localizer, t } from '../../core/localizer'; import { utilArrayDifference, utilArrayIdentical } from '../../util/array'; import { utilGetSetValue, utilNoAuto, utilRebind, utilTagDiff } from '../../util'; +import { uiTooltip } from '..'; export function uiSectionRawTagEditor(id, context) { @@ -157,7 +158,9 @@ export function uiSectionRawTagEditor(id, context) { addRowEnter .append('button') .attr('class', 'add-tag') + .attr('aria-label', t('inspector.add_to_tag')) .call(svgIcon('#iD-icon-plus', 'light')) + .call(uiTooltip().title(t.html('inspector.add_to_tag')).placement(localizer.textDirection() === 'ltr' ? 'right' : 'left')) .on('click', addTag); addRowEnter