Skip to content

Commit

Permalink
Clipboard: add hidden label to textarea, make it visisble to screen r…
Browse files Browse the repository at this point in the history
…eaders

Change-Id: I6f135752f8eacfcd2c97cd56ffc9826e36657a89
  • Loading branch information
pedropintosilva committed Oct 7, 2020
1 parent 2f046c0 commit 6abb99d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loleaflet/src/layer/marker/TextInput.js
Expand Up @@ -379,11 +379,16 @@ L.TextInput = L.Layer.extend({
// Note that the contents of the textarea are NOT deleted on each composed
// word, in order to make
this._textArea = L.DomUtil.create('textarea', 'clipboard', this._container);
this._textArea.id = 'clipboard-area';
this._textArea.setAttribute('autocapitalize', 'off');
this._textArea.setAttribute('autofocus', 'true');
this._textArea.setAttribute('autocorrect', 'off');
this._textArea.setAttribute('autocomplete', 'off');
this._textArea.setAttribute('spellcheck', 'false');

this._textAreaLabel = L.DomUtil.create('label', 'visuallyhidden', this._container);
this._textAreaLabel.setAttribute('for', 'clipboard-area');
this._textAreaLabel.innerHTML = 'clipboard area';

// Prevent automatic line breaks in the textarea. Without this,
// chromium/blink will trigger input/insertLineBreak events by
Expand Down

0 comments on commit 6abb99d

Please sign in to comment.