Skip to content
Merged
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
6 changes: 6 additions & 0 deletions src/components/CalendarView/hooks/useCalendarProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export function useCalendarProps(props: CalendarProps, state: CalendarState | Ra
const modeDisabled = state.disabled || isModeLast;

const modeButtonProps: ButtonButtonProps = {
// Always set a tabIndex so that Safari allows focusing native buttons
tabIndex: 0,
disabled: state.disabled,
// FIXME: do not use button class name
className: modeDisabled ? buttonDisabledClassName : undefined,
Expand Down Expand Up @@ -71,6 +73,8 @@ export function useCalendarProps(props: CalendarProps, state: CalendarState | Ra
});

const previousButtonProps: ButtonButtonProps = {
// Always set a tabIndex so that Safari allows focusing native buttons
tabIndex: 0,
disabled: state.disabled,
// FIXME: do not use button class name
className: previousDisabled ? buttonDisabledClassName : undefined,
Expand Down Expand Up @@ -104,6 +108,8 @@ export function useCalendarProps(props: CalendarProps, state: CalendarState | Ra
});

const nextButtonProps: ButtonButtonProps = {
// Always set a tabIndex so that Safari allows focusing native buttons
tabIndex: 0,
disabled: state.disabled,
// FIXME: do not use button class name
className: nextDisabled ? buttonDisabledClassName : undefined,
Expand Down
Loading