New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add accessibility buffer #171118
add accessibility buffer #171118
Conversation
I notice mouse wheel events still skip the a11y buffer and go to the main terminal, ideally we would change that as well as when you click on it to not switch back to the main terminal view. |
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Oh, I thought that was by design as I thought ppl would be using the keyboard to navigate and mouse to escape |
It was, but that was before I realized it would eventually enable keyboard caret selection. We can skip it for now as it's only on when you enable a11y mode. There are also low-vision users who may use screen readers and a mouse, so ideally it would work. |
return; | ||
} | ||
// The viewport is undefined when this is focused, so we cannot get the cell height from that. Instead, estimate using the font. | ||
const cellHeight = this._configHelper.getFont((this.xterm.raw as any)._core)?.charHeight || undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use this.xterm.getFont()
instead?
} | ||
// The viewport is undefined when this is focused, so we cannot get the cell height from that. Instead, estimate using the font. | ||
const cellHeight = this._configHelper.getFont((this.xterm.raw as any)._core)?.charHeight || undefined; | ||
this._accessibilityBuffer.style.lineHeight = cellHeight ? (this._configurationService.getValue(TerminalSettingId.LineHeight) as number) * cellHeight + 'px' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFont should return the lineHeight as well?
fixes #169853