Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Screen reader can't see syntax highlighting #238803

Closed
dennischenfeng opened this issue Jan 26, 2025 · 1 comment
Closed

Screen reader can't see syntax highlighting #238803

dennischenfeng opened this issue Jan 26, 2025 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@dennischenfeng
Copy link

dennischenfeng commented Jan 26, 2025

Type: Bug

Issue

With sight, I can see that code has syntax highlighting, like different colors/fonts for keywords, comments, docstrings, arguments, etc.
But using a screenreader (e.g. NVDA), the text is just all one global font style (basically white text on black background), as reported by the "report text formatting info" NVDA command, which has hotkey NVDA+f.

I'd like my screen reader to see the syntax highlighting so I can customize audio cues / audio highlighting for different types of text,
Like audio highlighting docstrings and comments to speak in higher-pitch from the speech synthesizer, etc.

How to replicate issue

  1. Create a python file. Add example code, with import statements, function definition, docstring, and single-line comment with hash symbol (#).
  2. Start NVDA and go to any of those lines, such as docstring vs one-line comment. Press NVDA+f hotkey
  3. Expected syntax highlighting, like different font color or anything else, but got same text formatting info for all lines:
4 space
Consolas
10.5 pt
very light grey on very dark grey
align left

What I've tried / workarounds

  • tried on both VS Code and VS Code Insiders, all were latest versions
  • tried disabling extensions
  • I even built clunky NVDA modifications to do audio highlighting based on parsing the text myself looking for "#" and triple quotes for docstrings/comments, but as expected it's pretty bad in practical use.

VS Code version: Code - Insiders 1.97.0-insider (0979fcb, 2025-01-24T16:41:13.583Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) Ultra 7 165U (14 x 2688)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 63.43GB (46.40GB free)
Process Argv --crash-reporter-id 10dd7f69-b098-4ad1-8341-1f89de36e2fd
Screen Reader yes
VM 0%
Extensions: none
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
a9j8j154:30646983
962ge761:30841072
pythonnoceb:30776497
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:30980852
pythonait:30973460
dvdeprecation:31040973
dwnewjupyter:31046869
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
cf971741:31144450
e80f6927:31120813
iacca1:31150324
notype1:31143044
dwcopilot:31158714
h409b430:31177054
5b1c1929:31184661
6074i472:31201624
dwoutputs:31217127
8did9651:31218798
9064b325:31222308
copilot_t_ci:31222730
ecdi0152:31224757

Keywords: font color, font style, accessibility, font formatting, text formatting

@meganrogge
Copy link
Contributor

/duplicate #184357

@vs-code-engineering vs-code-engineering bot added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 27, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants