Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 2caf356

Browse files
committed
fix: remove the tabindex button
1 parent 4cab4b4 commit 2caf356

File tree

18 files changed

+37
-20
lines changed

18 files changed

+37
-20
lines changed

packages/chakra-ui-core/src/CButton/CButton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const CButton = {
105105
props: this.$props,
106106
attrs: {
107107
type: this.type,
108-
tabIndex: 0,
108+
tabindex: 0,
109109
disabled: this.isDisabled || this.isLoading,
110110
'aria-disabled': this.isDisabled || this.isLoading,
111111
dataActive: this.isActive ? 'true' : undefined,

packages/chakra-ui-core/src/CEditable/CEditable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const CEditablePreview = {
225225
opacity: !this.hasValue ? 0.6 : undefined
226226
}
227227
},
228-
tabIndex () {
228+
tabindex () {
229229
const { isEditing, isDisabled, isPreviewFocusable } = this.context
230230
if ((!isEditing || !isDisabled) && isPreviewFocusable) {
231231
return 0
@@ -243,7 +243,7 @@ const CEditablePreview = {
243243
class: [this.className],
244244
attrs: {
245245
'aria-disabled': isDisabled,
246-
tabIndex: this.tabIndex,
246+
tabindex: this.tabindex,
247247
...this.computedAttrs
248248
},
249249
on: {

packages/chakra-ui-core/src/CLink/CLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const CLink = {
6363
...this.isRouterLink && { to: this.to }
6464
},
6565
attrs: {
66-
tabIndex: this.isDisabled ? -1 : undefined,
66+
tabindex: this.isDisabled ? -1 : undefined,
6767
'aria-disabled': this.isDisabled,
6868
...this.externalAttrs,
6969
...this.computedAttrs

packages/chakra-ui-core/src/CMenu/CMenu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ const CMenuList = {
415415
id: menuId,
416416
role: 'menu',
417417
'aria-labelledby': buttonId,
418-
tabIndex: -1,
418+
tabindex: -1,
419419
'data-chakra-component': 'CMenuButton'
420420
},
421421
on: {
@@ -484,7 +484,7 @@ const CMenuItem = {
484484
...this.menuItemStyles({ theme: this.theme, colorMode: this.colorMode }),
485485
...this.$attrs,
486486
role: this.role,
487-
tabIndex: -1,
487+
tabindex: -1,
488488
disabled: this.isDisabled,
489489
'aria-disabled': this.isDisabled,
490490
'data-chakra-component': 'CMenuItem'

packages/chakra-ui-core/src/CMenu/CMenuOption.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const CMenuItemOption = {
113113
alignItems: 'center',
114114
...this.$attrs,
115115
role: this.role,
116-
tabIndex: -1,
116+
tabindex: -1,
117117
'aria-checked': this.isChecked,
118118
disabled: this.isDisabled,
119119
'aria-disabled': this.isDisabled,

packages/chakra-ui-core/src/CModal/CModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ const CModalContent = {
445445
attrs: {
446446
role: 'dialog',
447447
'aria-modal': 'true',
448-
tabIndex: -1,
448+
tabindex: -1,
449449
id: contentId,
450450
...(addAriaDescribedby && { 'aria-describedby': bodyId }),
451451
...(addAriaLabelledby && { 'aria-labelledby': headerId }),

packages/chakra-ui-core/src/CPopover/CPopover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ const CPopoverContent = {
497497
_focus: { outline: 0, shadow: 'outline' },
498498
...this.$attrs,
499499
id: popoverId,
500-
tabIndex: -1,
500+
tabindex: -1,
501501
'aria-labelledby': this.headerId,
502502
'aria-describedby': this.bodyId,
503503
'aria-label': this.ariaLabel,

packages/chakra-ui-core/src/CPopover/CPopover.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ storiesOf('UI | Popover', module)
120120
<CPopover :closeOnBlur="false">
121121
<CPopoverTrigger>
122122
<CBox
123-
tabIndex="0"
123+
tabindex="0"
124124
role="button"
125125
aria-label="Some box"
126126
p="5"

packages/chakra-ui-core/src/CRadioButtonGroup/CRadioButtonGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const CRadioButtonGroup = {
157157
...(!isLastChild && spacingProps)
158158
},
159159
attrs: {
160-
tabIndex: getTabIndex()
160+
tabindex: getTabIndex()
161161
},
162162
nativeOn: {
163163
click: handleClick

packages/chakra-ui-core/src/CSlider/CSlider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ const CSliderThumb = {
456456
...this.computedAttrs,
457457
id: thumbId,
458458
role: 'slider',
459-
tabIndex: isDisabled ? undefined : 0,
459+
tabindex: isDisabled ? undefined : 0,
460460
'aria-disabled': isDisabled,
461461
'aria-valuemin': min,
462462
'aria-valuetext': valueText,

0 commit comments

Comments
 (0)