[QoL] Tab now moves to the next input field

This commit is contained in:
Aaro Koivukangas
2026-10-11 19:51:59 +03:00
parent 9cc0ad8e1d
commit 21b90c0908
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -87,6 +87,14 @@ test.describe('entering total hours', () => {
await expect(dayInput(page, MONDAY)).toHaveValue('6:45');
void user;
});
test('Tab moves straight to the next day, skipping the mode buttons', async ({ page, user }) => {
await page.goto('/');
await dayInput(page, MONDAY).focus();
await page.keyboard.press('Tab');
await expect(dayInput(page, TUE)).toBeFocused();
void user;
});
});
test.describe('start–end ranges', () => {
+2
View File
@@ -46,6 +46,8 @@ export function DayRow({ date, entry, worked, target, isToday, onChange }: Props
<button
key={m.mode}
type="button"
// Out of the tab order so Tab goes from one day's input straight to the next.
tabIndex={-1}
className={m.mode === mode ? 'active' : ''}
onClick={() => m.mode !== mode && onChange(emptyEntry(m.mode))}
>