Don't prevent default tabbing to elements (re: #8004)

This commit is contained in:
Quincy Morgan
2020-09-17 12:07:20 -04:00
parent d88d599f2c
commit 58014ace62
24 changed files with 1 additions and 42 deletions

View File

@@ -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')

View File

@@ -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() {

View File

@@ -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'));
}
}

View File

@@ -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 () {

View File

@@ -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() {

View File

@@ -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);

View File

@@ -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();

View File

@@ -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);

View File

@@ -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);

View File

@@ -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

View File

@@ -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));

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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() {

View File

@@ -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')

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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() {

View File

@@ -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'));

View File

@@ -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')

View File

@@ -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);

View File

@@ -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;