make additional buttons and links keyboard accessible

This commit is contained in:
Albin Larsson
2019-07-31 08:24:26 +02:00
parent d5da5a601c
commit cd5cd81ba5
15 changed files with 1 additions and 19 deletions

View File

@@ -236,7 +236,6 @@ export function uiBackground(context) {
.attr('class', 'imagery-faq')
.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.call(svgIcon('#iD-icon-out-link', 'inline'))
.attr('href', 'https://github.com/openstreetmap/iD/blob/master/FAQ.md#how-can-i-report-an-issue-with-background-imagery')
.append('span')
@@ -316,7 +315,6 @@ export function uiBackground(context) {
_toggleButton = selection
.append('button')
.attr('tabindex', -1)
.on('click', uiBackground.togglePane)
.call(svgIcon('#iD-icon-layers', 'light'))
.call(paneTooltip);

View File

@@ -273,7 +273,6 @@ export function uiCommit(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

@@ -39,7 +39,6 @@ export function uiContributors(context) {
.attr('class', 'user-link')
.attr('href', function(d) { return osm.userURL(d); })
.attr('target', '_blank')
.attr('tabindex', -1)
.text(String);
if (u.length > limit) {
@@ -47,7 +46,6 @@ export function uiContributors(context) {
count.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', function() {
return osm.changesetsURL(context.map().center(), context.map().zoom());
})

View File

@@ -66,7 +66,6 @@ export function uiGeolocate(context) {
selection
.append('button')
.attr('tabindex', -1)
.attr('title', t('geolocate.title'))
.on('click', click)
.call(svgIcon('#iD-icon-geolocate', 'light'))

View File

@@ -299,7 +299,6 @@ export function uiHelp(context) {
uiHelp.renderToggleButton = function(selection) {
_toggleButton = selection.append('button')
.attr('tabindex', -1)
.on('click', uiHelp.togglePane)
.call(svgIcon('#iD-icon-help', 'light'))
.call(paneTooltip);

View File

@@ -190,7 +190,6 @@ export function uiInit(context) {
issueLinks
.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', 'https://github.com/openstreetmap/iD/issues')
.call(svgIcon('#iD-icon-bug', 'light'))
.call(tooltip().title(t('report_a_bug')).placement('top'));
@@ -198,7 +197,6 @@ export function uiInit(context) {
issueLinks
.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', 'https://github.com/openstreetmap/iD/blob/master/CONTRIBUTING.md#translating')
.call(svgIcon('#iD-icon-translate', 'light'))
.call(tooltip().title(t('help_translate')).placement('top'));

View File

@@ -677,7 +677,6 @@ export function uiIssues(context) {
uiIssues.renderToggleButton = function(selection) {
_toggleButton = selection
.append('button')
.attr('tabindex', -1)
.on('click', uiIssues.togglePane)
.call(svgIcon('#iD-icon-alert', 'light'))
.call(addNotificationBadge)

View File

@@ -787,7 +787,6 @@ export function uiMapData(context) {
_toggleButton = selection
.append('button')
.attr('tabindex', -1)
.on('click', uiMapData.togglePane)
.call(svgIcon('#iD-icon-data', 'light'))
.call(paneTooltip);

View File

@@ -173,7 +173,6 @@ export function uiRawMemberEditor(context) {
.append('button')
.attr('class', 'member-zoom')
.attr('title', t('icons.zoom_to'))
.attr('tabindex', -1)
.call(svgIcon('#iD-icon-geolocate'))
.on('click', zoomToMember);

View File

@@ -43,7 +43,6 @@ export function uiSourceSwitch(context) {
.attr('href', '#')
.text(t('source_switch.live'))
.classed('live', true)
.attr('tabindex', -1)
.on('click', click);
};

View File

@@ -113,7 +113,6 @@ export function uiToolOldDrawModes(context) {
// enter
var buttonsEnter = buttons.enter()
.append('button')
.attr('tabindex', -1)
.attr('class', function(d) { return d.id + ' add-button bar-button'; })
.on('click.mode-buttons', function(d) {
if (!enabled(d)) return;

View File

@@ -84,7 +84,6 @@ export function uiToolSave(context) {
button = selection
.append('button')
.attr('class', 'save disabled bar-button')
.attr('tabindex', -1)
.on('click', save)
.call(tooltipBehavior);
@@ -94,6 +93,7 @@ export function uiToolSave(context) {
button
.append('span')
.attr('class', 'count')
.attr('aria-hidden', 'true')
.text('0');
updateCount();

View File

@@ -15,7 +15,6 @@ export function uiToolSidebarToggle(context) {
selection
.append('button')
.attr('class', 'bar-button')
.attr('tabindex', -1)
.on('click', function() {
context.ui().sidebar.toggle();
})

View File

@@ -25,7 +25,6 @@ export function uiVersion(context) {
selection
.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', 'https://github.com/openstreetmap/iD')
.text(currVersion);
@@ -36,7 +35,6 @@ export function uiVersion(context) {
.attr('class', 'badge')
.append('a')
.attr('target', '_blank')
.attr('tabindex', -1)
.attr('href', 'https://github.com/openstreetmap/iD/blob/master/CHANGELOG.md#whats-new')
.call(svgIcon('#maki-gift-11'))
.call(tooltip()

View File

@@ -55,7 +55,6 @@ export function uiZoom(context) {
.data(zooms)
.enter()
.append('button')
.attr('tabindex', -1)
.attr('class', function(d) { return d.id; })
.on('click.editor', function(d) { d.action(); })
.call(tooltip()