Image RemovedImage Added
...
Code Block |
---|
language | js |
---|
theme | Emacs |
---|
title | 에디터 설정 |
---|
|
//...
'editor.toolbar': [
//...,
'WebAccessibilityCheckerwebAccessibilityChecker',
//...
],
// ... |
메뉴에 추가
Code Block |
---|
language | js |
---|
theme | Emacs |
---|
title | 에디터 설정 |
---|
|
//...
'editor.menu.definition': {
//...,
'tools': [
//...,
'WebAccessibilityCheckerwebAccessibilityChecker',
//...
],
//...
},
//... |
API
editor.checkWebAccessibility(callback, rules)
Status |
---|
colour | Yellow |
---|
title | 릴리즈 2.7.0 이상 |
---|
|
...
name | Type | Description |
---|
callback | Function | 웹 접근성 검사 결과를 받을 콜백함수입니다. 검사 결과가 Boolean 으로 반환됩니다. Code Block |
---|
function (result) {
// result 값 true: 통과, false: 실패
} |
|
rules | String[] | Status |
---|
colour | Yellow |
---|
title | 릴리즈 2.10.3 이상 |
---|
|
검사할 항목을 지정합니다. 항목이 지정된 경우 에디터에 설정된 검사항목(webAccessibilityChecker.config)은 무시되고, 지정하지 않으면 에디터에 설정된 검사항목으로 검사됩니다. 검사항목: 항목 | 설명 |
---|
image-alt | 이미지 대체텍스트(alt) 검사 | se-custom-image-alt | se-custom-table-has-th | 테이블 제목 셀(th) 검사 | se-custom-table-has-caption | 테이블 제목(caption) 검사 | se-custom-link-has-title-attr | 링크 title 속성 검사 | se-custom-video-has-title-attr | 비디오 title 속성 검사 | frame-title | frame title 속성 검사 | se-custom-iframe-has-title-attr |
|
Example:
Code Block |
---|
|
editor.checkWebAccessibility(function (result) {
if (!result) {
// 웹 접근성 검사가 통과되지 않으면 웹 접근성 검사 다이얼로그 열기
editor.getUIManager().showDialog('WebAccessibilityChecker');
}
}); |
Code Block |
---|
|
// 이미지 대체텍스트만 검사하기
var rules = ['image-alt', 'se-custom-image-alt'];
editor.checkWebAccessibility(function (result) {
.....
}, rules);
// TABLE CAPTION만 검사하기
var rules = ['se-custom-table-has-caption'];
editor.checkWebAccessibility(function (result) {
.....
}, rules); |
Config
Status |
---|
colour | Yellow |
---|
title | 릴리즈 2.10.3 이상 |
---|
|
에디터 설정을 통해 검사할 항목을 설정할 수 있습니다.
설정한 내용은 웹 접근성 검사 다이얼로그와 'editor.checkWebAccessibility()' API에 동일하게 적용됩니다.
Code Block |
---|
language | js |
---|
theme | Emacs |
---|
title | 에디터 설정 |
---|
|
'webAccessibilityChecker.config': {
rules: ['image-alt', 'se-custom-image-alt', ...]
} |