Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image RemovedImage Added

Status
title릴리즈 2.4.0 이상

...

Code Block
languagejs
themeEmacs
title에디터 설정
//...
'editor.toolbar': [
	//...,
	'WebAccessibilityCheckerwebAccessibilityChecker',
	//...
],
// ...

메뉴에 추가

Code Block
languagejs
themeEmacs
title에디터 설정
//...
'editor.menu.definition': {
	//...,
	'tools': [
		//...,
		'WebAccessibilityCheckerwebAccessibilityChecker',
		//...
	],
	//...
},
//...


API

editor.checkWebAccessibility(callback, rules)

Status
colourYellow
title릴리즈 2.7.0 이상

...

nameTypeDescription
callbackFunction

웹 접근성 검사 결과를 받을 콜백함수입니다. 검사 결과가 Boolean 으로 반환됩니다.

Code Block
function (result) {
    // result 값 true: 통과, false: 실패
}


rulesString[]

Status
colourYellow
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
languagejs
themeEmacs
editor.checkWebAccessibility(function (result) {
	if (!result) {
		// 웹 접근성 검사가 통과되지 않으면 웹 접근성 검사 다이얼로그 열기
		editor.getUIManager().showDialog('WebAccessibilityChecker');
	}
});


Code Block
languagejs
themeEmacs
// 이미지 대체텍스트만 검사하기
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
colourYellow
title릴리즈 2.10.3 이상

...