diff --git a/packages/nimble-components/src/checkbox/index.ts b/packages/nimble-components/src/checkbox/index.ts index 399ac8f9b7..8a1d80626f 100644 --- a/packages/nimble-components/src/checkbox/index.ts +++ b/packages/nimble-components/src/checkbox/index.ts @@ -29,9 +29,9 @@ export class Checkbox extends FoundationCheckbox { /** * @internal */ - public get resolvedTabIndex(): string | undefined { + public get resolvedTabindex(): string | undefined { const tabIndex = this.tabIndex ?? 0; - return this.disabled ? undefined : tabIndex.toString(); + return this.disabled ? undefined : `${tabIndex}`; } } diff --git a/packages/nimble-components/src/checkbox/template.ts b/packages/nimble-components/src/checkbox/template.ts index 7b98f02f69..b5865a3b3e 100644 --- a/packages/nimble-components/src/checkbox/template.ts +++ b/packages/nimble-components/src/checkbox/template.ts @@ -15,7 +15,7 @@ CheckboxOptions aria-required="${x => x.required}" aria-disabled="${x => x.disabled}" aria-readonly="${x => x.readOnly}" - tabindex="${x => x.resolvedTabIndex}" + tabindex="${x => x.resolvedTabindex}" @keypress="${(x, c) => x.keypressHandler(c.event as KeyboardEvent)}" @click="${(x, c) => x.clickHandler(c.event as MouseEvent)}" class="${x => (x.readOnly ? 'readonly' : '')} ${x => (x.checked ? 'checked' : '')} ${x => (x.indeterminate ? 'indeterminate' : '')}" diff --git a/packages/nimble-components/src/toggle-button/index.ts b/packages/nimble-components/src/toggle-button/index.ts index 309241246b..c1eedba2e0 100644 --- a/packages/nimble-components/src/toggle-button/index.ts +++ b/packages/nimble-components/src/toggle-button/index.ts @@ -60,9 +60,9 @@ export class ToggleButton extends FoundationSwitch implements ButtonPattern { /** * @internal */ - public get resolvedTabIndex(): string | undefined { + public get resolvedTabindex(): string | undefined { const tabIndex = this.tabIndex ?? 0; - return this.disabled ? undefined : tabIndex.toString(); + return this.disabled ? undefined : `${tabIndex}`; } } applyMixins(ToggleButton, StartEnd, DelegatesARIAButton); diff --git a/packages/nimble-components/src/toggle-button/template.ts b/packages/nimble-components/src/toggle-button/template.ts index 5a0eed410e..98e01aca57 100644 --- a/packages/nimble-components/src/toggle-button/template.ts +++ b/packages/nimble-components/src/toggle-button/template.ts @@ -17,7 +17,7 @@ ButtonOptions