From 58014ace62e3835bc0a3b0ebfae52568cd4549fc Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Thu, 17 Sep 2020 12:07:20 -0400 Subject: [PATCH] Don't prevent default tabbing to elements (re: #8004) --- modules/ui/changeset_editor.js | 1 - modules/ui/feature_info.js | 1 - modules/ui/field.js | 2 -- modules/ui/field_help.js | 1 - modules/ui/fields/input.js | 2 -- modules/ui/fields/localized.js | 1 - modules/ui/fields/wikidata.js | 2 -- modules/ui/fields/wikipedia.js | 1 - modules/ui/full_screen.js | 1 - modules/ui/improveOSM_comments.js | 1 - modules/ui/init.js | 4 ---- modules/ui/issues_info.js | 1 - modules/ui/note_comments.js | 1 - modules/ui/note_editor.js | 1 - modules/ui/panels/history.js | 8 -------- modules/ui/popover.js | 1 + modules/ui/sections/data_layers.js | 1 - modules/ui/sections/entity_issues.js | 1 - modules/ui/sections/raw_member_editor.js | 2 -- modules/ui/sections/raw_membership_editor.js | 2 -- modules/ui/sections/raw_tag_editor.js | 1 - modules/ui/success.js | 2 -- modules/ui/tag_reference.js | 4 ---- modules/ui/tools/notes.js | 1 - 24 files changed, 1 insertion(+), 42 deletions(-) diff --git a/modules/ui/changeset_editor.js b/modules/ui/changeset_editor.js index 6adf1313e..bf70af160 100644 --- a/modules/ui/changeset_editor.js +++ b/modules/ui/changeset_editor.js @@ -104,7 +104,6 @@ export function uiChangesetEditor(context) { commentEnter .append('a') .attr('target', '_blank') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-alert', 'inline')) .attr('href', t('commit.google_warning_link')) .append('span') diff --git a/modules/ui/feature_info.js b/modules/ui/feature_info.js index 845412f39..f4fecc933 100644 --- a/modules/ui/feature_info.js +++ b/modules/ui/feature_info.js @@ -28,7 +28,6 @@ export function uiFeatureInfo(context) { selection.append('a') .attr('class', 'chip') .attr('href', '#') - .attr('tabindex', -1) .html(t('feature_info.hidden_warning', { count: count })) .call(tooltipBehavior) .on('click', function() { diff --git a/modules/ui/field.js b/modules/ui/field.js index 271800754..9dae64fb3 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -143,7 +143,6 @@ export function uiField(context, presetField, entityIDs, options) { .append('button') .attr('class', 'remove-icon') .attr('title', t('icons.remove')) - .attr('tabindex', -1) .call(svgIcon('#iD-operation-delete')); } @@ -152,7 +151,6 @@ export function uiField(context, presetField, entityIDs, options) { .append('button') .attr('class', 'modified-icon') .attr('title', t('icons.undo')) - .attr('tabindex', -1) .call(svgIcon((localizer.textDirection() === 'rtl') ? '#iD-icon-redo' : '#iD-icon-undo')); } } diff --git a/modules/ui/field_help.js b/modules/ui/field_help.js index ba8b0e9b7..f61f30d58 100644 --- a/modules/ui/field_help.js +++ b/modules/ui/field_help.js @@ -149,7 +149,6 @@ export function uiFieldHelp(context, fieldName) { button.enter() .append('button') .attr('class', 'field-help-button') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-help')) .merge(button) .on('click', function () { diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 3f231cb17..4482f081c 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -80,7 +80,6 @@ export function uiFieldText(field, context) { buttons.enter() .append('button') - .attr('tabindex', -1) .attr('class', function(d) { var which = (d === 1 ? 'increment' : 'decrement'); return 'form-field-button ' + which; @@ -106,7 +105,6 @@ export function uiFieldText(field, context) { outlinkButton.enter() .append('button') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-out-link')) .attr('class', 'form-field-button foreign-id-permalink') .attr('title', function() { diff --git a/modules/ui/fields/localized.js b/modules/ui/fields/localized.js index 3906b494f..9cd5529ba 100644 --- a/modules/ui/fields/localized.js +++ b/modules/ui/fields/localized.js @@ -219,7 +219,6 @@ export function uiFieldLocalized(field, context) { translateButton = translateButton.enter() .append('button') .attr('class', 'localized-add form-field-button') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-plus')) .merge(translateButton); diff --git a/modules/ui/fields/wikidata.js b/modules/ui/fields/wikidata.js index 51586b55b..23a80985a 100644 --- a/modules/ui/fields/wikidata.js +++ b/modules/ui/fields/wikidata.js @@ -94,7 +94,6 @@ export function uiFieldWikidata(field, context) { .append('button') .attr('class', 'form-field-button wiki-link') .attr('title', t('icons.view_on', { domain: 'wikidata.org' })) - .attr('tabindex', -1) .call(svgIcon('#iD-icon-out-link')) .on('click', function() { d3_event.preventDefault(); @@ -131,7 +130,6 @@ export function uiFieldWikidata(field, context) { .append('button') .attr('class', 'form-field-button') .attr('title', t('icons.copy')) - .attr('tabindex', -1) .call(svgIcon('#iD-operation-copy')) .on('click', function() { d3_event.preventDefault(); diff --git a/modules/ui/fields/wikipedia.js b/modules/ui/fields/wikipedia.js index 0db48abc7..97ec971a1 100644 --- a/modules/ui/fields/wikipedia.js +++ b/modules/ui/fields/wikipedia.js @@ -128,7 +128,6 @@ export function uiFieldWikipedia(field, context) { link = link.enter() .append('button') .attr('class', 'form-field-button wiki-link') - .attr('tabindex', -1) .attr('title', t('icons.view_on', { domain: 'wikipedia.org' })) .call(svgIcon('#iD-icon-out-link')) .merge(link); diff --git a/modules/ui/full_screen.js b/modules/ui/full_screen.js index 9422afbf1..296d35e02 100644 --- a/modules/ui/full_screen.js +++ b/modules/ui/full_screen.js @@ -65,7 +65,6 @@ export function uiFullScreen(context) { // button = selection.append('button') // .attr('title', t('full_screen')) - // .attr('tabindex', -1) // .on('click', fullScreen) // .call(tooltip); diff --git a/modules/ui/improveOSM_comments.js b/modules/ui/improveOSM_comments.js index e4ba9e779..034b24454 100644 --- a/modules/ui/improveOSM_comments.js +++ b/modules/ui/improveOSM_comments.js @@ -52,7 +52,6 @@ export function uiImproveOsmComments() { .append('a') .attr('class', 'comment-author-link') .attr('href', osm.userURL(d.username)) - .attr('tabindex', -1) .attr('target', '_blank'); } selection diff --git a/modules/ui/init.js b/modules/ui/init.js index 6f51d89d3..3422e8d99 100644 --- a/modules/ui/init.js +++ b/modules/ui/init.js @@ -298,13 +298,11 @@ export function uiInit(context) { aboutList .append('li') .attr('class', 'feature-warning') - .attr('tabindex', -1) .call(uiFeatureInfo(context)); aboutList .append('li') .attr('class', 'issues-info') - .attr('tabindex', -1) .call(uiIssuesInfo(context)); var apiConnections = context.apiConnections(); @@ -312,7 +310,6 @@ export function uiInit(context) { aboutList .append('li') .attr('class', 'source-switch') - .attr('tabindex', -1) .call(uiSourceSwitch(context) .keys(apiConnections) ); @@ -321,7 +318,6 @@ export function uiInit(context) { aboutList .append('li') .attr('class', 'user-list') - .attr('tabindex', -1) .call(uiContributors(context)); diff --git a/modules/ui/issues_info.js b/modules/ui/issues_info.js index 147aba79d..bf96cf3e5 100644 --- a/modules/ui/issues_info.js +++ b/modules/ui/issues_info.js @@ -56,7 +56,6 @@ export function uiIssuesInfo(context) { return 'chip ' + d.id + '-count'; }) .attr('href', '#') - .attr('tabindex', -1) .each(function(d) { var chipSelection = d3_select(this); diff --git a/modules/ui/note_comments.js b/modules/ui/note_comments.js index b8ea4ba5c..09dddaa67 100644 --- a/modules/ui/note_comments.js +++ b/modules/ui/note_comments.js @@ -51,7 +51,6 @@ export function uiNoteComments() { .append('a') .attr('class', 'comment-author-link') .attr('href', osm.userURL(d.user)) - .attr('tabindex', -1) .attr('target', '_blank'); } selection diff --git a/modules/ui/note_editor.js b/modules/ui/note_editor.js index c49dcdfaa..dfa07db02 100644 --- a/modules/ui/note_editor.js +++ b/modules/ui/note_editor.js @@ -304,7 +304,6 @@ export function uiNoteEditor(context) { .attr('class', 'user-info') .text(user.display_name) .attr('href', osm.userURL(user.display_name)) - .attr('tabindex', -1) .attr('target', '_blank'); prose diff --git a/modules/ui/panels/history.js b/modules/ui/panels/history.js index 6ba0eea1f..2f5631f40 100644 --- a/modules/ui/panels/history.js +++ b/modules/ui/panels/history.js @@ -40,7 +40,6 @@ export function uiPanelHistory(context) { .attr('class', 'user-osm-link') .attr('href', osm.userURL(userName)) .attr('target', '_blank') - .attr('tabindex', -1) .text('OSM'); } @@ -49,7 +48,6 @@ export function uiPanelHistory(context) { .attr('class', 'user-hdyc-link') .attr('href', 'https://hdyc.neis-one.org/?' + userName) .attr('target', '_blank') - .attr('tabindex', -1) .text('HDYC'); } @@ -77,7 +75,6 @@ export function uiPanelHistory(context) { .attr('class', 'changeset-osm-link') .attr('href', osm.changesetURL(changeset)) .attr('target', '_blank') - .attr('tabindex', -1) .text('OSM'); } @@ -86,7 +83,6 @@ export function uiPanelHistory(context) { .attr('class', 'changeset-osmcha-link') .attr('href', 'https://osmcha.org/changesets/' + changeset) .attr('target', '_blank') - .attr('tabindex', -1) .text('OSMCha'); links @@ -94,7 +90,6 @@ export function uiPanelHistory(context) { .attr('class', 'changeset-achavi-link') .attr('href', 'https://overpass-api.de/achavi/?changeset=' + changeset) .attr('target', '_blank') - .attr('tabindex', -1) .text('Achavi'); } @@ -169,7 +164,6 @@ export function uiPanelHistory(context) { .append('a') .attr('class', 'view-history-on-osm') .attr('target', '_blank') - .attr('tabindex', -1) .attr('href', osm.noteURL(note)) .call(svgIcon('#iD-icon-out-link', 'inline')) .append('span') @@ -196,7 +190,6 @@ export function uiPanelHistory(context) { .attr('class', 'view-history-on-osm') .attr('href', osm.historyURL(entity)) .attr('target', '_blank') - .attr('tabindex', -1) .attr('title', t('info_panels.history.link_text')) .text('OSM'); } @@ -205,7 +198,6 @@ export function uiPanelHistory(context) { .attr('class', 'pewu-history-viewer-link') .attr('href', 'https://pewu.github.io/osm-history/#/' + entity.type + '/' + entity.osmId()) .attr('target', '_blank') - .attr('tabindex', -1) .text('PeWu'); var list = selection diff --git a/modules/ui/popover.js b/modules/ui/popover.js index bf5915570..42ee586ee 100644 --- a/modules/ui/popover.js +++ b/modules/ui/popover.js @@ -189,6 +189,7 @@ export function uiPopover(klass) { .on('click.popover', toggle); popoverSelection + // This attribute lets the popover take focus .attr('tabindex', 0) .on('blur.popover', function() { anchor.each(function() { diff --git a/modules/ui/sections/data_layers.js b/modules/ui/sections/data_layers.js index e8a0d43b8..f74cb9b4d 100644 --- a/modules/ui/sections/data_layers.js +++ b/modules/ui/sections/data_layers.js @@ -229,7 +229,6 @@ export function uiSectionDataLayers(context) { .attr('class', 'vectortile-footer') .append('a') .attr('target', '_blank') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-out-link', 'inline')) .attr('href', 'https://github.com/osmus/detroit-mapping-challenge') .append('span') diff --git a/modules/ui/sections/entity_issues.js b/modules/ui/sections/entity_issues.js index 1f2a45228..0a403f1b9 100644 --- a/modules/ui/sections/entity_issues.js +++ b/modules/ui/sections/entity_issues.js @@ -113,7 +113,6 @@ export function uiSectionEntityIssues(context) { .append('button') .attr('class', 'issue-info-button') .attr('title', t('icons.information')) - .attr('tabindex', -1) .call(svgIcon('#iD-icon-inspect')); infoButton diff --git a/modules/ui/sections/raw_member_editor.js b/modules/ui/sections/raw_member_editor.js index 1d08585c3..44aebb11f 100644 --- a/modules/ui/sections/raw_member_editor.js +++ b/modules/ui/sections/raw_member_editor.js @@ -199,7 +199,6 @@ export function uiSectionRawMemberEditor(context) { label .append('button') - .attr('tabindex', -1) .attr('title', t('icons.remove')) .attr('class', 'remove member-delete') .call(svgIcon('#iD-operation-delete')); @@ -230,7 +229,6 @@ export function uiSectionRawMemberEditor(context) { .append('button') .attr('class', 'member-download') .attr('title', t('icons.download')) - .attr('tabindex', -1) .call(svgIcon('#iD-icon-load')) .on('click', downloadMember); } diff --git a/modules/ui/sections/raw_membership_editor.js b/modules/ui/sections/raw_membership_editor.js index 077d1e9d3..cbe830d01 100644 --- a/modules/ui/sections/raw_membership_editor.js +++ b/modules/ui/sections/raw_membership_editor.js @@ -274,7 +274,6 @@ export function uiSectionRawMembershipEditor(context) { labelEnter .append('button') - .attr('tabindex', -1) .attr('class', 'remove member-delete') .call(svgIcon('#iD-operation-delete')) .on('click', deleteMembership); @@ -333,7 +332,6 @@ export function uiSectionRawMembershipEditor(context) { newLabelEnter .append('button') - .attr('tabindex', -1) .attr('class', 'remove member-delete') .call(svgIcon('#iD-operation-delete')) .on('click', function() { diff --git a/modules/ui/sections/raw_tag_editor.js b/modules/ui/sections/raw_tag_editor.js index bdb012542..8c7eec6d4 100644 --- a/modules/ui/sections/raw_tag_editor.js +++ b/modules/ui/sections/raw_tag_editor.js @@ -204,7 +204,6 @@ export function uiSectionRawTagEditor(id, context) { innerWrap .append('button') - .attr('tabindex', -1) .attr('class', 'form-field-button remove') .attr('title', t('icons.remove')) .call(svgIcon('#iD-operation-delete')); diff --git a/modules/ui/success.js b/modules/ui/success.js index 46454d7e2..4a12d4b3a 100644 --- a/modules/ui/success.js +++ b/modules/ui/success.js @@ -100,7 +100,6 @@ export function uiSuccess(context) { .append('a') .attr('class', 'link-out') .attr('target', '_blank') - .attr('tabindex', -1) .attr('href', t('success.help_link_url')) .call(svgIcon('#iD-icon-out-link', 'inline')) .append('span') @@ -221,7 +220,6 @@ export function uiSuccess(context) { .append('a') .attr('class', 'link-out') .attr('target', '_blank') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-out-link', 'inline')) .attr('href', 'https://github.com/osmlab/osm-community-index/issues') .append('span') diff --git a/modules/ui/tag_reference.js b/modules/ui/tag_reference.js index 5d3f760a1..bccf58625 100644 --- a/modules/ui/tag_reference.js +++ b/modules/ui/tag_reference.js @@ -68,7 +68,6 @@ export function uiTagReference(what) { .append('a') .attr('class', 'tag-reference-edit') .attr('target', '_blank') - .attr('tabindex', -1) .attr('title', t('inspector.edit_reference')) .attr('href', docs.editURL) .call(svgIcon('#iD-icon-edit', 'inline')); @@ -78,7 +77,6 @@ export function uiTagReference(what) { .append('a') .attr('class', 'tag-reference-link') .attr('target', '_blank') - .attr('tabindex', -1) .attr('href', docs.wiki.url) .call(svgIcon('#iD-icon-out-link', 'inline')) .append('span') @@ -91,7 +89,6 @@ export function uiTagReference(what) { .append('a') .attr('class', 'tag-reference-comment-link') .attr('target', '_blank') - .attr('tabindex', -1) .call(svgIcon('#iD-icon-out-link', 'inline')) .attr('href', t('commit.about_changeset_comments_link')) .append('span') @@ -154,7 +151,6 @@ export function uiTagReference(what) { .append('button') .attr('class', 'tag-reference-button ' + (klass || '')) .attr('title', t('icons.information')) - .attr('tabindex', -1) .call(svgIcon('#iD-icon-' + (iconName || 'inspect'))) .merge(_button); diff --git a/modules/ui/tools/notes.js b/modules/ui/tools/notes.js index 49c750ab3..02c48a5b0 100644 --- a/modules/ui/tools/notes.js +++ b/modules/ui/tools/notes.js @@ -73,7 +73,6 @@ export function uiToolNotes(context) { // enter var buttonsEnter = buttons.enter() .append('button') - .attr('tabindex', -1) .attr('class', function(d) { return d.id + ' add-button bar-button'; }) .on('click.notes', function(d) { if (!enabled(d)) return;