Skip to content

fix(time-picker): prevent time-picker part steppers from being focusable #6982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/time-picker/time-picker.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ describe("calcite-time-picker", () => {

describe("should focus the first focusable element when setFocus is called (ltr)", () => {
focusable(`calcite-time-picker`, {
shadowFocusTargetSelector: `.${CSS.buttonHourUp}`
shadowFocusTargetSelector: `.${CSS.input}.${CSS.hour}`
});
});

describe("should focus the first focusable element when setFocus is called (rtl)", () => {
focusable(`<calcite-time-picker dir="rtl" lang="ar"></calcite-time-picker>`, {
shadowFocusTargetSelector: `.${CSS.buttonHourUp}`
shadowFocusTargetSelector: `.${CSS.input}.${CSS.hour}`
});
});

Expand Down
7 changes: 0 additions & 7 deletions src/components/time-picker/time-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,6 @@ export class TimePicker
onClick={this.incrementHour}
onKeyDown={this.hourUpButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-up" scale={iconScale} />
</span>
Expand Down Expand Up @@ -813,7 +812,6 @@ export class TimePicker
onClick={this.decrementHour}
onKeyDown={this.hourDownButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-down" scale={iconScale} />
</span>
Expand Down Expand Up @@ -861,7 +859,6 @@ export class TimePicker
onClick={this.decrementMinute}
onKeyDown={this.minuteDownButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-down" scale={iconScale} />
</span>
Expand All @@ -878,7 +875,6 @@ export class TimePicker
onClick={this.incrementSecond}
onKeyDown={this.secondUpButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-up" scale={iconScale} />
</span>
Expand Down Expand Up @@ -910,7 +906,6 @@ export class TimePicker
onClick={this.decrementSecond}
onKeyDown={this.secondDownButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-down" scale={iconScale} />
</span>
Expand All @@ -937,7 +932,6 @@ export class TimePicker
onClick={this.incrementMeridiem}
onKeyDown={this.meridiemUpButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-up" scale={iconScale} />
</span>
Expand Down Expand Up @@ -970,7 +964,6 @@ export class TimePicker
onClick={this.decrementMeridiem}
onKeyDown={this.meridiemDownButtonKeyDownHandler}
role="button"
tabIndex={-1}
>
<calcite-icon icon="chevron-down" scale={iconScale} />
</span>
Expand Down