Skip to content

Commit cc2dd6f

Browse files
committed
fix(table): accessibility fix on checkbox
1 parent 8b1dff6 commit cc2dd6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/table/table.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export class Table implements AfterViewInit, OnDestroy {
281281

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

291291
static focus(element: HTMLElement) {
292292
const focusElementList = getFocusElementList(element, tabbableSelectorIgnoreTabIndex);
293-
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") && focusElementList.length > 0) {
293+
if (element.firstElementChild && element.firstElementChild.classList.contains("bx--table-sort") || focusElementList.length > 0) {
294294
focusElementList[0].focus();
295295
} else {
296296
element.focus();

0 commit comments

Comments
 (0)