Skip to content

Commit

Permalink
Add -1 tab index to status bar entries
Browse files Browse the repository at this point in the history
This keeps them out of the tab order, but allows them to be read with a screen reader

Fixes #41406
  • Loading branch information
alexr00 authored and aeschli committed Jun 24, 2019
1 parent 44e034c commit 9e052f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ class StatusbarEntryItem extends Disposable {

// Label Container
this.labelContainer = document.createElement('a');
this.labelContainer.tabIndex = -1; // allows screen readers to read title, but still prevents tab focus.

// Label
this.label = new OcticonLabel(this.labelContainer);
Expand Down Expand Up @@ -718,7 +719,7 @@ class StatusbarEntryItem extends Disposable {
this.applyColor(this.labelContainer, entry.color);
}

// Update: Backgroud
// Update: Background
if (!this.entry || entry.backgroundColor !== this.entry.backgroundColor) {
if (entry.backgroundColor) {
this.applyColor(this.container, entry.backgroundColor, true);
Expand Down

0 comments on commit 9e052f1

Please sign in to comment.