TypeStrong / typedoc

Documentation generator for TypeScript projects.
https://typedoc.org
Apache License 2.0
7.61k stars 689 forks source link

Search results are not announced in type doc search edit field. #2630

Open msftedad opened 1 month ago

msftedad commented 1 month ago

Search terms

Expected Behavior

while entering text in the search field narrator should announce the displaying results.

Actual Behavior

while entering text in the search field narrator not announcing the displaying results.

Steps to reproduce the bug

  1. Open https://typedoc.org/api/ in edge browser.
  2. Navigate to type doc search edit field present in the top right of the page and invoke it.
  3. In search edit field enter some text and observe narrator announcement whether the search results are announced or not!

search results not announcing.webm

Environment

Gerrit0 commented 1 month ago

I'm unlikely to get to this anytime soon, last time narrator and I crossed paths I emerged victorious, but very frustrated. PR welcome!

msftedad commented 1 month ago

@Gerrit0, please let us know if you need more information.Thanks

Gerrit0 commented 1 month ago

Doing a little bit of research on this... I'm not convinced announcing results is a good idea. Interrupting people's flow is (almost) never a good thing.

I did a bit of investigation of other sites with dynamic search results as well, and they also do not announce results:

I found only two sites which did announce results:

Perhaps this is that I have not spent a lot of time with narrator, but it seemed to behave very poorly, resulting in a significantly worse experience than the sites which did not announce results. With Bing, half the time it was announcing results which I had never even seen on the screen because I'd started typing other characters, so the results were out of date. With TypeScript's site, the results were even worse. It refused to stop announcing search results and neither tab nor down arrow appears to let me select the resulting links to actually select them.

If there's one thing that this has taught me, it's that apparently doing this right is next to impossible... Wikipedia's search results seemed to be the best behaved to me. Dictionary.com wasn't bad, but from there it degraded rapidly, with none of the other sites seeming to behave nicely.

Are you aware of any sites where this is actually done in a way it isn't more annoying than helpful?

msftedad commented 1 month ago

@Gerrit0, Thanks for the response. We are currently in discussion with our internal dependent team and SME. Once we get the response, we will update you soon.

msftedad commented 1 month ago

@Gerrit0 - We have checked on https://www.microsoft.com/en-us/ Narrator is announcing proper information of search result. Same expected on https://typedoc.org/api/

Gerrit0 commented 4 weeks ago

I just tried it, and... no, it doesn't. It says "Suggestions available" when entering the search box, and they are displayed for non-narrator users, but they do not appear to be usable with narrator, or I just don't understand how it works. If that's the case, please provide the necessary keystrokes to reproduce it working.

https://support.microsoft.com/en-us/windows/chapter-5-navigation-68941680-3245-6ef5-5012-0674b8b6fc59 claims that I should be able to use up/down keys to select results, which is non-functional. Furthermore, hitting tab closes the search box and suggestions, so there's not even a way to tab through those results.

msftedad commented 3 weeks ago

Please refer attached Video with Narrator behavior for (https://www.microsoft.com/en-us/)

https://github.com/user-attachments/assets/b45a40cf-392e-4472-aa46-39fa1bc5649f

Observation: Narrator is announcing proper information as “11 results are available, use up and down arrow keys to navigate search expanded M edit” and on invoking down arrow key focus goes to Suggestion list results.

This information will be helpful for Narrator users as it will be easy for them to understand how many search results are available.

Gerrit0 commented 3 weeks ago

That is very strange, that's not at all the behavior which I receive. Maybe narrator doesn't work properly within a VM?

Going to leave this as help wanted. I'd be happy to look at someone's attempt at fixing this, but I'd rather spend time on something which isn't horribly painful to work on.

msftedad commented 2 weeks ago

@Gerrit0 - thanks, let me know if anything else is required from our side.