Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

use document role for chat responses on windows/linux #236636

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AccessibilityVerbositySettingId } from '../../accessibility/browser/acc
import { IAccessibleViewService } from '../../../../platform/accessibility/browser/accessibleView.js';
import { ChatTreeItem } from './chat.js';
import { isRequestVM, isResponseVM, IChatResponseViewModel } from '../common/chatViewModel.js';
import { isMacintosh } from '../../../../base/common/platform.js';

export class ChatAccessibilityProvider implements IListAccessibilityProvider<ChatTreeItem> {

Expand All @@ -24,7 +25,7 @@ export class ChatAccessibilityProvider implements IListAccessibilityProvider<Cha
}

getRole(element: ChatTreeItem): AriaRole | undefined {
return 'listitem';
return isMacintosh ? 'listitem' : 'document';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mac, using document vs listitem would limit navigation flexibility

What do you mean by that? voiceover handles it differently?

I'll yield to your judgement for this, but I thought that we generally don't use 'document' because of the downsides you mention. Do we use it in other places in VS Code?

Could you add a comment about this in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using document role is too restrictive with voiceover. It would make navigation within the element challenging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to talk through this with JooYoung tomorrow

}

getWidgetAriaLabel(): string {
Expand Down
Loading