Skip to content

Commit

Permalink
feat(a11y): added zIndex if it wasn't there
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Didenko committed Jun 17, 2024
1 parent 96194a7 commit ff58dd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 3 additions & 4 deletions blocks/CloudImageEditor/src/EditorButtonControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export class EditorButtonControl extends Block {
this._titleEl = this.ref['title-el'];
this._iconEl = this.ref['icon-el'];

// this.setAttribute('role', 'button');
// if (this.tabIndex === -1) {
// this.tabIndex = 0;
// }
if (this.firstElementChild.tabIndex === -1) {
this.firstElementChild.tabIndex = 0;
}

this.sub('title', (title) => {
let titleEl = this._titleEl;
Expand Down
2 changes: 0 additions & 2 deletions blocks/CloudImageEditor/src/EditorToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ export class EditorToolbar extends Block {
/** @param {MouseEvent} e */
'on.clickTab': (e) => {
const id = /** @type {HTMLElement} */ (e.currentTarget).getAttribute('data-id');

console.log({ id });
if (id) {
this._activateTab(id, { fromViewer: false });
}
Expand Down
7 changes: 3 additions & 4 deletions blocks/CloudImageEditor/src/elements/button/LrBtnUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ export class LrBtnUi extends Block {
this._iconSingle = false;
});

// this.setAttribute('role', 'button');
// if (this.tabIndex === -1) {
// this.tabIndex = 0;
// }
if (this.firstElementChild.tabIndex === -1) {
this.firstElementChild.tabIndex = 0;
}
if (!this.hasAttribute('theme')) {
this.setAttribute('theme', 'default');
}
Expand Down

0 comments on commit ff58dd8

Please sign in to comment.