logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
30.07k stars 1.76k forks source link

Outline structure is unparsable by screen readers #11274

Open wiresong opened 2 weeks ago

wiresong commented 2 weeks ago

Search first

What Happened?

I use Logseq with the NVDA screen reader. While there is visual outline structure to blocks, which makes blocks/subblocks distinct, there is no such structure for my screen reader to use. Given something like the following:

The screen reader reads blocks a1 to a7 in order, without informing me about the indentation of any block. For me, this makes Logseq mostly unusable for its principle job as an outliner.

Reproduce the Bug

  1. Open Logseq (either the web interface or the desktop app) using JAWS/NVDA/your screen reader of choice
  2. Create the following structure:
  1. Read through the page with the typical screen reader navigation keys

Expected Behavior

The screen reader has structure which it can use to (1) announce the relative indentation of blocks, and (2) let me navigate through the structure with the keys that the screen reader assigns for me.

Screenshots

No response

Desktop or Mobile Platform Information

No response

Additional Context

Ideally, the easiest way to solve this would be to make each block a <li>...</li>, and allow the structure to be represented as nested <ul>...</ul>s. Using semantic HTML like this is all that is required-screen readers can then use that information to offer rich speech and navigation facilities. I'm not sure how that would play with the CSS, though, so further work might be required there?

Another option would be to use ARIA to annotate specific blocks with list information, and that would probably play better with the CSS, but ideally we only do that if doing lists in HTML isn't feasible.

I'm willing to do a PR, as long as we end up using nested lists for this, and as long as someone can verify that my code doesn't break visual structure. I've made small accessibility tweaks to my local Logseq codebase, so adding this shouldn't be too much work (hopefully).

Are you willing to submit a PR? If you know how to fix the bug.