Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
79e075ec
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
79e075ec
编写于
6月 17, 2020
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tests
上级
17202755
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
4 deletion
+8
-4
src/vs/base/browser/ui/aria/aria.ts
src/vs/base/browser/ui/aria/aria.ts
+8
-4
未找到文件。
src/vs/base/browser/ui/aria/aria.ts
浏览文件 @
79e075ec
...
@@ -47,6 +47,10 @@ export function setARIAContainer(parent: HTMLElement) {
...
@@ -47,6 +47,10 @@ export function setARIAContainer(parent: HTMLElement) {
* Given the provided message, will make sure that it is read as alert to screen readers.
* Given the provided message, will make sure that it is read as alert to screen readers.
*/
*/
export
function
alert
(
msg
:
string
):
void
{
export
function
alert
(
msg
:
string
):
void
{
if
(
!
ariaContainer
)
{
return
;
}
// Use alternate containers such that duplicated messages get read out by screen readers #99466
// Use alternate containers such that duplicated messages get read out by screen readers #99466
if
(
alertContainer
.
textContent
!==
msg
)
{
if
(
alertContainer
.
textContent
!==
msg
)
{
dom
.
clearNode
(
alertContainer2
);
dom
.
clearNode
(
alertContainer2
);
...
@@ -61,6 +65,10 @@ export function alert(msg: string): void {
...
@@ -61,6 +65,10 @@ export function alert(msg: string): void {
* Given the provided message, will make sure that it is read as status to screen readers.
* Given the provided message, will make sure that it is read as status to screen readers.
*/
*/
export
function
status
(
msg
:
string
):
void
{
export
function
status
(
msg
:
string
):
void
{
if
(
!
ariaContainer
)
{
return
;
}
if
(
isMacintosh
)
{
if
(
isMacintosh
)
{
alert
(
msg
);
// VoiceOver does not seem to support status role
alert
(
msg
);
// VoiceOver does not seem to support status role
}
else
{
}
else
{
...
@@ -75,10 +83,6 @@ export function status(msg: string): void {
...
@@ -75,10 +83,6 @@ export function status(msg: string): void {
}
}
function
insertMessage
(
target
:
HTMLElement
,
msg
:
string
):
void
{
function
insertMessage
(
target
:
HTMLElement
,
msg
:
string
):
void
{
if
(
!
ariaContainer
)
{
return
;
}
dom
.
clearNode
(
target
);
dom
.
clearNode
(
target
);
if
(
msg
.
length
>
MAX_MESSAGE_LENGTH
)
{
if
(
msg
.
length
>
MAX_MESSAGE_LENGTH
)
{
msg
=
msg
.
substr
(
0
,
MAX_MESSAGE_LENGTH
);
msg
=
msg
.
substr
(
0
,
MAX_MESSAGE_LENGTH
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录