Skip to content

Prototype improved a11y buffer view#4340

Merged
meganrogge merged 22 commits intoxtermjs:masterfrom
Tyriar:a11y_mode
Jan 18, 2023
Merged

Prototype improved a11y buffer view#4340
meganrogge merged 22 commits intoxtermjs:masterfrom
Tyriar:a11y_mode

Conversation

@Tyriar
Copy link
Copy Markdown
Member

@Tyriar Tyriar commented Dec 20, 2022

I got some feedback that the current navigation mode isn't very intuitive. This explores adding a different element, accessible via shift+tab (which will by default skip the terminal) that when focused fills a contenteditable element with the content of the buffer. This allows easy traversal using a screen reader and also selection.

image

An issue I'm currently hitting is when this element is created, NVDA can freeze for 15-60 seconds I'm guessing to update its model of the DOM. I tried caching the scrollback elements but that actually ends up worse when running tree as it doesn't do any debouncing, even if optimized it will probably add a noticeable delay between output and announcing. Capping the output to 100 is a workaround for this, it's not ideal though. A monaco instance may be a way to fix this problem, at least within VS Code.

I also thought we could leverage shell integration here in VS Code by exposing some delegate on the API that takes care of constructing the DOM elements, that way we could logically split up the buffer into command/output.

cc @meganrogge

@meganrogge meganrogge marked this pull request as ready for review January 18, 2023 19:11
@meganrogge meganrogge added this to the 5.2.0 milestone Jan 18, 2023
Copy link
Copy Markdown
Member Author

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some lint issues:

/home/vsts/work/1/s/src/browser/AccessibilityManager.ts
  333:50  warning  Strings must use singlequote  @typescript-eslint/quotes

/home/vsts/work/1/s/src/browser/TestUtils.test.ts
  143:110  warning  Expected a comma          @typescript-eslint/member-delimiter-style
  143:151  warning  Unexpected separator (;)  @typescript-eslint/member-delimiter-style
  316:110  warning  Expected a comma          @typescript-eslint/member-delimiter-style
  316:151  warning  Unexpected separator (;)  @typescript-eslint/member-delimiter-style

/home/vsts/work/1/s/src/browser/Types.d.ts
  147:91  warning  Expected a comma  @typescript-eslint/member-delimiter-style

/home/vsts/work/1/s/src/browser/Viewport.ts
  283:98  warning  Expected a comma  @typescript-eslint/member-delimiter-style

✖ 7 problems (0 errors, 7 warnings)
  0 errors and 7 warnings potentially fixable with the `--fix` option.

Copy link
Copy Markdown
Member Author

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more lint issue

@meganrogge
Copy link
Copy Markdown
Member

fixed the lint issue, will add that

@meganrogge meganrogge enabled auto-merge (squash) January 18, 2023 22:53
@meganrogge meganrogge merged commit 41dc93a into xtermjs:master Jan 18, 2023
@JasonXJ
Copy link
Copy Markdown

JasonXJ commented Apr 13, 2023

Hi, I wonder what is the current status of this? It seems that on ToT, the old a11y tree based on list elements is gone, but the new thing (based on contexteditable element?) is also not ready? I am not able to use the screen reader on the terminal any more.

@Tyriar
Copy link
Copy Markdown
Member Author

Tyriar commented May 24, 2023

@JasonXJ the situation is vscode should be much better now, for other xterm.js embedders we also brought back the old a11y tree.

@JasonXJ JasonXJ mentioned this pull request Jun 20, 2023
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.

3 participants