Skip to content

update deckbrowser layout to support Homerow #4553

Open
villegascmarco wants to merge 2 commits intoankitects:mainfrom
villegascmarco:fix/ui-mapping
Open

update deckbrowser layout to support Homerow #4553
villegascmarco wants to merge 2 commits intoankitects:mainfrom
villegascmarco:fix/ui-mapping

Conversation

@villegascmarco
Copy link

update deck browser layout to support keyboard shortcut from third parties.

Some third-party keyboard shortcut and hinting tools (like Homerow) were unable to detect deck entries in the Deck Browser because the list was rendered using a <table>. In Qt WebEngine, interactive elements inside tables are not always exposed correctly to accessibility and automation APIs.
This change updates the Deck Browser layout to use <div>-based rows instead, preserving the same visual appearance while making deck links and buttons consistently selectable by external keyboard shortcut tools.

Before

Screenshot 2026-02-09 at 21 08 01 Screenshot 2026-02-09 at 21 08 05 Screenshot 2026-02-09 at 22 34 51

Now

Screenshot 2026-02-09 at 23 52 17 Screenshot 2026-02-09 at 23 52 34

@abdnh
Copy link
Collaborator

abdnh commented Feb 10, 2026

Some add-ons rely on the decks list being a table, so this will potentially cause issues. Maybe we can solve this by setting ARIA roles instead?

The main screen will be eventually overhauled, but we want to avoid UI changes until then.

@villegascmarco
Copy link
Author

I found this on the internet:

Let me see if I understand well: this PR updates <table> tags to <div> tags, but with ARIA roles I would be replacing <table> tags to <div role="table">, is that right?

@villegascmarco
Copy link
Author

@abdnh I made a proof o concept and seems like is not the right approach , third party apps do not work when using ARIA role set to "table" either.

The change is pretty basic in my opinion, shouldn't be a big deal to update the target in the add-ons to be a div with a certain class instead of a <table> tag. Lmk what you think

@abdnh
Copy link
Collaborator

abdnh commented Feb 11, 2026

<table> already behaves as it has role=table. I was thinking you can test with some interactive role such as link: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles

The change is pretty basic in my opinion, shouldn't be a big deal to update the target in the add-ons to be a div with a certain class instead of a <table> tag. Lmk what you think

A lot of add-ons that touch the deck list depend on the table structure (e.g. Enhance main window), as Anki doesn't have high-level hooks to customize the UI. It's hard to justify additional work for add-ons for little benefit at this stage (You can already perform most actions using built-in shortcuts), but we can revisit this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants