mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
make additional buttons and links keyboard accessible
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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());
|
||||
})
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ export function uiSourceSwitch(context) {
|
||||
.attr('href', '#')
|
||||
.text(t('source_switch.live'))
|
||||
.classed('live', true)
|
||||
.attr('tabindex', -1)
|
||||
.on('click', click);
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
})
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user