pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Accessibility: HTML entities are not escaped when pressing control+shift+space

Open TheQuinbox opened this issue 1 year ago • 9 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.69.2
  • OS Version: Windows 10 21H2 (x64) build 19044.1766

Steps to Reproduce:

  1. Open a Python file.
  2. Type "dict()" without the quotes.
  3. Start Narrator, NVDA, or another Windows screen reader.
  4. press control+shift+space while inside the ().
  5. I hear:
__map: SupportsKeysAndGetItem[_KT@dict, _VT@dict], dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's\     (key, value) pairs\ dict(iterable) -> new dictionary initialized as if via:\     d = {} for k, v in iterable:\         d\[k\] = v\ dict(\*\*kwargs) -> new dictionary initialized with the name=value pairs\     in the keyword argument list. For example: dict(one=1, two=2), hint 

This is extremely hard to read to say the least, with all the HTML entities being spoken. It would be great if these could be escaped, and turned into standard symbols.

TheQuinbox avatar Jul 26 '22 17:07 TheQuinbox

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.69.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

VSCodeTriageBot avatar Jul 26 '22 17:07 VSCodeTriageBot

@luabud this issue is about python parameter hints. Are you escaping those? Or is this wrongly read by nvda?

isidorn avatar Jul 28 '22 17:07 isidorn

great question! I don't think we're doing anything different from what TypeScript does with type hints, but I could be wrong. @bschnurr -- do you know if we're escaping the variable type hints?

luabud avatar Jul 28 '22 23:07 luabud

Friendly reminder to unassign issues before transferring otherwise it breaks our triaging flow.

karrtikr avatar Aug 02 '22 00:08 karrtikr

I'm not escaping anything in the hint, but the hint should just be the type. Maybe its reading the onHover text?

bschnurr avatar Aug 02 '22 17:08 bschnurr

hmm. NVDA seems to handle it fine.

bschnurr avatar Aug 02 '22 21:08 bschnurr

Just tested again, and it doesn't on my side. Would an audio recording possibly help?

TheQuinbox avatar Aug 04 '22 03:08 TheQuinbox

dict(|)

cursor at | correct?

bschnurr avatar Aug 04 '22 05:08 bschnurr

video would help

bschnurr avatar Aug 04 '22 05:08 bschnurr

I wasn't able to reproduce it either, unfortunately. I'm wondering if there may be an extension other than Pylance that is providing these parameter hints. Perhaps it may help if all extensions but the Pylance and Python ones are disabled, and seeing if the problem still occurs?

luabud avatar Aug 10 '22 23:08 luabud

Disabling all extensions that aren't Python fixed it. Weird, and going to be a pain to trace, but not related to Pylance, so closing it.

TheQuinbox avatar Aug 11 '22 00:08 TheQuinbox