Skip to content

Commit

Permalink
fix(table): accessibility fix on checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
rkkp1023 committed Mar 18, 2023
1 parent 8b1dff6 commit cc2dd6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/table/table.component.ts
Expand Up @@ -281,7 +281,7 @@ export class Table implements AfterViewInit, OnDestroy {

static setTabIndex(element: HTMLElement, index: -1 | 0) {
const focusElementList = getFocusElementList(element, tabbableSelectorIgnoreTabIndex);
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") && focusElementList.length > 0) {
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") || focusElementList.length > 0) {
focusElementList[0].tabIndex = index;
} else {
element.tabIndex = index;
Expand All @@ -290,7 +290,7 @@ export class Table implements AfterViewInit, OnDestroy {

static focus(element: HTMLElement) {
const focusElementList = getFocusElementList(element, tabbableSelectorIgnoreTabIndex);
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") && focusElementList.length > 0) {
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") || focusElementList.length > 0) {
focusElementList[0].focus();
} else {
element.focus();
Expand Down

0 comments on commit cc2dd6f

Please sign in to comment.