diff --git a/modules/ui/geolocate.js b/modules/ui/geolocate.js index e65ea201b3..21e4c201aa 100644 --- a/modules/ui/geolocate.js +++ b/modules/ui/geolocate.js @@ -77,7 +77,7 @@ export function uiGeolocate(context) { function updateButtonState() { _button.classed('active', _layer.enabled()); - _button.attr('aria-selected', _layer.enabled()); + _button.attr('aria-pressed', _layer.enabled()); } return function(selection) { @@ -86,7 +86,7 @@ export function uiGeolocate(context) { _button = selection .append('button') .on('click', click) - .attr('aria-selected', false) + .attr('aria-pressed', false) .call(svgIcon('#iD-icon-geolocate', 'light')) .call(uiTooltip() .placement((localizer.textDirection() === 'rtl') ? 'right' : 'left') diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index 1a09f3f56c..9409f6c1b2 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -84,7 +84,8 @@ export function uiSectionRawTagEditor(id, context) { var optionsEnter = options.enter() .insert('div', ':first-child') - .attr('class', 'raw-tag-options'); + .attr('class', 'raw-tag-options') + .attr('role', 'tablist'); var optionEnter = optionsEnter.selectAll('.raw-tag-option') .data(availableViews, function(d) { return d.id; }) @@ -96,6 +97,7 @@ export function uiSectionRawTagEditor(id, context) { return 'raw-tag-option raw-tag-option-' + d.id + (_tagView === d.id ? ' selected' : ''); }) .attr('aria-selected', function(d) { return _tagView === d.id; }) + .attr('role', 'tab') .attr('title', function(d) { return t('icons.' + d.id); }) .on('click', function(d3_event, d) { _tagView = d.id; diff --git a/modules/ui/tools/modes.js b/modules/ui/tools/modes.js index 7267d24b8a..66109c664a 100644 --- a/modules/ui/tools/modes.js +++ b/modules/ui/tools/modes.js @@ -139,7 +139,7 @@ export function uiToolOldDrawModes(context) { .merge(buttonsEnter) .attr('aria-disabled', function(d) { return !enabled(d); }) .classed('disabled', function(d) { return !enabled(d); }) - .attr('aria-selected', function(d) { return context.mode() && context.mode().button === d.button; }) + .attr('aria-pressed', function(d) { return context.mode() && context.mode().button === d.button; }) .classed('active', function(d) { return context.mode() && context.mode().button === d.button; }); } }; diff --git a/modules/ui/tools/notes.js b/modules/ui/tools/notes.js index 6ba23b3771..776ba8f0e2 100644 --- a/modules/ui/tools/notes.js +++ b/modules/ui/tools/notes.js @@ -108,7 +108,9 @@ export function uiToolNotes(context) { buttons = buttons .merge(buttonsEnter) .classed('disabled', function(d) { return !enabled(d); }) - .classed('active', function(d) { return context.mode() && context.mode().button === d.button; }); + .attr('aria-disabled', function(d) { return !enabled(d); }) + .classed('active', function(d) { return context.mode() && context.mode().button === d.button; }) + .attr('aria-pressed', function(d) { return context.mode() && context.mode().button === d.button; }); } };