[Accessibility]: Make syntax highlight accessible to screen reader users via a speech scheme #184357
Labels
accessibility
Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues
feature-request
Request for new features or functionality
grammar
Syntax highlighting grammar
Milestone
CC @meganrogge and @isidorn
Syntax highlight remains inaccessible to screen reader users. I propose using a speech scheme to address this issue. Speech scheme is a technique using and switching between different speech synthesizer voices for visual formattings, such as colors, fonts, sizes, etc.
Just like sighted people see different colors for syntax types, screen readers would be able to hear different voice per syntax highlight type.
As far as I know, there is no straight way to communicate with screen readers to force them to switch voices. However, the following solutions are available:
Using
lang
attribute. The HTMLlang
attribute is recognized via screen readers and supported screen reader voice engines, such as JAWS/NVDA Vocalizer and iOS/Mac OSX can detect and automatically switch between different voices (e.g., en-US, en-GB, etc.)Using server-side voice engines as an option for syntax highlight. Just like VSCode LiveShare extension, you can consider using API to send a server-side voice engines to control all the details. However, screen reader users need to suspend their screen reader speech while using this option that might be inconvenient.
To come up with a more robust solution in the long run, however, I think VSCode team needs to work with some popular screen reader vendors.
System Info
Version: 1.79.0-insider (system setup)
Commit: 666396d
Date: 2023-06-05T11:30:50.018Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
The text was updated successfully, but these errors were encountered: