[User script] Focus on First Task in Table view. Keyboard accessibility

Focus on First Task in Vikunja Table view.

After the page is loaded user is able to use “Tab”/“Shift+Tab” on keyboard to navigate forth/back through tasks in Table view of a project/saved filter.
It’s achievable through Violentmonkey script, though also compatible with other User script managers like Tampermonkey, Greasemonkey, etc.
Violentmonkey is a privacy focused browser extension that lets you run custom user scripts to automate or change how websites behave.

Use Case: You have a saved filter that displays recently changed/created tasks that are not completed yet - basically “Recent” view. You setup a table view for this saved filter and map opening it to some shortcut on your OS. This way when you have to see details of recent stuff you can quickly and conviniently use your keyboard only to do that. Here’s visual of what is meant:

https://ibb.co/bgVvWM9T

Known bugs

  • If you don’t see first task highlighted - just reload the page.

How to Install

Supported plugins: Violentmonkey, Tampermonkey, Greasemonkey.

Script: greasyfork

Configuration

You have to change the @match parameter in script to your Vikunja URL.

Optionally: for the shortcut scenario here’s example of how that shortcut looks like in Firefox PWA extension:

@echo off
:: Set your Vikunja details here (placeholders - replace with actual values)
set PWA_ID=01K3RJKPDT7AGZ174AGFRTKH4G
firefoxpwa site launch %PWA_ID% --url "https://try.vikunja.io/projects/-20/504"
:: -20 is saved filter's ID & 504 is table view ID

Tech Details

Focuses on the first element in the first of the specified table when it becomes available.
By default the focus lands on the Vikunja logo in top left corner and it takes a lot of “Tab“ presses to reach the first task.