Skip to content

Commit

Permalink
Map canvas can receive keyboard focus only when it's interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
thom4parisot committed May 22, 2024
1 parent 44e5ee7 commit e2775ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2849,7 +2849,7 @@ export class Map extends Camera {
this._canvas = DOM.create('canvas', 'maplibregl-canvas', canvasContainer);
this._canvas.addEventListener('webglcontextlost', this._contextLost, false);
this._canvas.addEventListener('webglcontextrestored', this._contextRestored, false);
this._canvas.setAttribute('tabindex', '0');
this._canvas.setAttribute('tabindex', this._interactive ? '0' : '-1');
this._canvas.setAttribute('aria-label', this._getUIString('Map.Title'));
this._canvas.setAttribute('role', 'region');

Expand Down

0 comments on commit e2775ac

Please sign in to comment.