Skip to content

Commit

Permalink
[UPD] add aria info
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Oct 11, 2024
1 parent 7b327c5 commit 0ae4a55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/control/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ var ol_control_Dialog = class olcontrolDialog extends ol_control_Control {
this.setContent(options);
}
this.element.classList.add('ol-visible');
this.element.setAttribute('aria-hidden', false);
var input = this.element.querySelector('input[type="text"],input[type="search"],input[type="number"]');
if (input)
input.focus();
Expand Down Expand Up @@ -294,6 +295,7 @@ var ol_control_Dialog = class olcontrolDialog extends ol_control_Control {
*/
hide() {
this.element.classList.remove('ol-visible');
this.element.setAttribute('aria-hidden', true)
this.dispatchEvent({ type: 'hide' });
}
/** Close the dialog
Expand Down

0 comments on commit 0ae4a55

Please sign in to comment.