Skip to content

fix next/prev navigation in the accessible view - #221523

Merged
Megan Rogge (meganrogge) merged 6 commits into
mainfrom
merogge/acc-view-next-prev
Jul 12, 2024
Merged

Megan Rogge (meganrogge) merged 6 commits into
mainfrom
merogge/acc-view-next-prev

Conversation

@meganrogge

@meganrogge Megan Rogge (meganrogge) commented Jul 11, 2024 •

Copy link
Copy Markdown
Collaborator

fixes #221497
fixes #221521

When I got rid of calling show directly on the AccessibleViewService from within implementations of accessible views with the adoption of the AccessibleViewRegistry, #212138, it broke next/previous navigation in the accessible view.

This was for the best - as before, in order to navigate to the next/previous, we would focus the actual element, which would hide the view, and reopen the view entirely.

This was not reliable and involved hacks to make it work. Furthermore, we had to alert screen reader users to indicate the focus change that was happening. Now, we have a better approach for next/previous navigation, and we use it - implementations provide string values in their provideNextContent/providePreviousContent functions, and the AccessibleViewService takes care of the rest.

As a result, the content of the accessible view is updated and there's no focus change.

There were a few places where we were returning '' from provideContent, which should never happen. I've improved the when clauses so providers only get created if there's going to be content and will throw now for unexpected cases. Henning Dieterichs (@hediet) and Alex Ross (@alexr00) inline completions and comments are examples of that if you want to look at those changes.

@meganrogge
Megan Rogge (meganrogge) marked this pull request as draft July 11, 2024 23:29
@meganrogge Megan Rogge (meganrogge) added this to the July 2024 milestone Jul 11, 2024
@meganrogge
Megan Rogge (meganrogge) marked this pull request as ready for review July 12, 2024 17:00
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) July 12, 2024 17:05
@meganrogge
Megan Rogge (meganrogge) enabled auto-merge (squash) July 12, 2024 17:19
@meganrogge
Megan Rogge (meganrogge) deleted the merogge/acc-view-next-prev branch July 12, 2024 18:20
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

go to next/previous in accessible view for inline completions doesn't work go to next/previous in the accessible view no longer work

2 participants