예시 페이지 : https://bric1.postech.ac.kr/bric/member/join.do?mode=agree&membertypeCd=M
영상 내용을 음성 또는 원고로 제공해 주어야 하지만 일일이 자막 처리를 할 수가 없어서 접근성 심사를 위해 iframe을 유튜브 링크로 넘어가게 하는 버튼으로 대체하는 방법으로 해결한다.
App.WebAccessCommon = function () {
var self;
var removeEl
return {
init: function () {
self = this;
if (window.location.href.indexOf("webinar") > -1) {
$('body').addClass('webinar');
// 웨비나 상세 하위 유튜브 영역 iframe 삭제 후 링크 버튼으로 대체
if($('.bn-view-common .fr-video iframe').length > 0) {
$('.bn-view-common .fr-video iframe').each(function() {
var videoId = $(this).attr('src').split('/')[4];
var videoURL = 'https://www.youtube.com/watch?v=' + videoId;
var videoButton = '<a href="'+ videoURL +'" title="새창열림" target="_blank" class="btn-more-square red">Youtube 영상 확인하기</a>';
$(this).parent('.fr-video').after(videoButton);
$(this).parent('.fr-video').remove();
})
} // end of if
}
},
}
}();
공통으로 사용하는 레이어팝업 함수(popup.js)는 최초 구축시 사용하기 용이하다. 구축되어있는 사이트에서 추가적으로 레이어팝업 접근성 처리가 필요한 경우 유형에 맞게 해당 함수를 선언하여 사용한다.
레이어팝업의 컨테이너, 여는 버튼, 닫는 버튼의 클래스가 제각각일 때 함수를 팩토리 함수 방식으로 사용한다.
$(document).ready(function(){
// 레이어팝업을 버튼으로 열고 함수에서 정의된 클래스를 사용하는 유형
App.CareerLayerPopup = LayerPopupAccessibility();
App.CareerLayerPopup.init();
// 레이어팝업을 버튼으로 열고 커스텀 클래스를 사용하는 유형
App.CareerLayerPopup = LayerPopupAccessibility();
App.CareerLayerPopup.init({
popupWrap: '.layer-small',
openBtn: '.btn-popup-open',
closeBtn: '.btn-popup-close',
});
// 페이지 진입 시 레이어팝업이 열리는 유형
App.CareerLayerPopup02 = LayerPopupAccessibility();
App.CareerLayerPopup02.init({
popupType: 'noOpenBtn',
});
});
//-----------------------------------------------------------------------------------------
// 레이어팝업 포커싱 관련 접근성
//-----------------------------------------------------------------------------------------
function LayerPopupAccessibility() {
var self, settings, popupType, $popupWrap, $openBtn, openBtn, $closeBtn;
var returnElement;
function bindEvents(opt) {
settings = $.extend({
popupType: 'default', //팝업타입
popupWrap: '.popup-wrap', //팝업 레이아웃 클래스
openBtn: '.btn-popup-open', //팝업 버튼 클래스
closeBtn: '.btn-popup-close', //팝업 닫기 버튼 클래스
}, opt);
popupType = settings.popupType;
$popupWrap = $(settings.popupWrap);
$openBtn = $(settings.openBtn);
openBtn= settings.openBtn;
$closeBtn = $(settings.closeBtn);
if(popupType == 'noOpenBtn'){
// 페이지 진입 시 팝업 열기
if($('body').find(opt.popupWrap)){
openPopup();
returnElement = $('body').find('.wrap');
}
} else {
// 팝업 버튼 클릭 시 팝업 열기 (popupType == 'default')
$(document).on('click', openBtn, function () {
$(this).addClass('returnBtn');
returnElement = $('.returnBtn');
setTimeout(function () {
openPopup();
}, 200);
});
}
// 팝업 닫기 버튼 클릭 시 팝업 닫기
$closeBtn.click(function () {
closePopup();
});
}
function openPopup() {
/* 다른 스크립트에서 해당 동작을 진행하는 경우 주석 가능 */
$popupWrap.fadeIn();
$popupWrap.addClass('active');
/* 다른 스크립트에서 해당 동작을 진행하는 경우 주석 가능 end */
$popupWrap.attr('tabindex', 0).focus();
var focusableElements = $popupWrap.find(':focusable');
var lastIndex = focusableElements.length - 1;
if(lastIndex == 0){ //팝업에 포커스 가능한 요소가 하나일 때
focusableElements.eq(lastIndex).addClass('popup-layer-last-child');
$popupWrap.on('keydown', function(event) {
if (event.shiftKey && event.keyCode === 9) {
// Shift + Tab키 : 초점 받을 수 있는 마지막 요소에서 첫번째 요소로 초점 이동
event.preventDefault();
$('.popup-layer-last-child').focus();
}
});
$('.popup-layer-last-child').on('keydown', function(event) {
if (!event.shiftKey && event.keyCode === 9) {
// Tab키 : 초점 받을 수 있는 첫번째 요소에서 마지막 요소로 초점 이동
event.preventDefault();
$popupWrap.focus();
}
});
} else {
focusableElements.eq(0).addClass('popup-layer-first-child');
focusableElements.eq(lastIndex).addClass('popup-layer-last-child');
// 첫 번째 요소에서 Shift + Tab 처리
$('.popup-layer-first-child').on('keydown', function (event) {
if (event.shiftKey && event.keyCode === 9) {
event.preventDefault();
$('.popup-layer-last-child').focus();
}
});
// 마지막 요소에서 Tab 처리
$('.popup-layer-last-child').on('keydown', function (event) {
if (!event.shiftKey && event.keyCode === 9) {
event.preventDefault();
$('.popup-layer-first-child').focus();
}
});
}
}
function closePopup() {
$('.popup-layer-first-child').removeClass('popup-layer-first-child');
$('.popup-layer-last-child').removeClass('popup-layer-last-child');
$popupWrap.removeAttr('tabindex');
/* 다른 스크립트에서 해당 동작을 진행하는 경우 주석 가능 */
$popupWrap.fadeOut();
$popupWrap.removeClass('active');
/* 다른 스크립트에서 해당 동작을 진행하는 경우 주석 가능 end */
if(popupType == 'default'){
returnElement.removeClass('returnBtn');
} else {
returnElement.attr('tabindex', 0);
}
returnElement.focus();
}
return {
init: function (opt) {
bindEvents(opt);
}
};
}
$(document).ready(function() {
//학교안내 > 부서기관 > 본부 컨텐츠 탭
App.AccessToTab.init({
activateLater: function() {
// User-defined functions
}
});
});
//======================================================================
// 학교안내 > 부서기관 컨텐츠 탭 - 접근성
//======================================================================
App.AccessToTab = function(){
var self;
var settings;
var $activeTitTab = null;
var $activeParents = null;
var idx;
var topWrap, tabBox, tabContent, btnMore;
var topWrapIndex;
return {
init: function(opt){
self = this;
settings = $.extend({
topWrap : '[data-access="mini-tab-box"]',
tabBox : '[data-access="mini-title-box"]',
tabContent : '[data-access="mini-content-box"]',
btnMore : '[data-access="btn-more"]',
}, opt);
topWrap = settings.topWrap;
tabBox = settings.tabBox;
tabContent = settings.tabContent;
btnMore = settings.btnMore;
//탭 미니보드가 2개 이상인데 btnMore 버튼이 없을 때 a태그 추가
$(topWrap).each(function() {
if($(this).find(btnMore).length == 0) {
const h4Text = $(this).closest('.con-box').find('h4').text().trim();
$(this).append('');
}
//초기화시 active되어있는 첫 탭콘텐츠에 tabindex적용
$(topWrap).find(tabContent + ' > div.active').attr('tabindex', '0');
});
$(tabBox).find('li a').attr('role','tab');
//탭 클릭시
$(topWrap + ' ' + tabBox + ' li > a').on('click', function () {
idx = $(this).parents('li').index();
$activeTitTab = $(this);
$activeParents = $activeTitTab.parents(topWrap);
//해당 탭 active
$(this).parent().siblings().removeClass('active');
$(this).parent().addClass('active');
//해당 탭과 매치되는 콘텐츠 active
$activeParents.find(tabContent + ' > div').removeClass('active').removeAttr('tabindex');
$activeParents.find(tabContent + ' > div:eq(' + idx + ')').addClass('active').attr('tabindex', '0');
//탭에 선택됨 타이틀 적용
$(this).parent().siblings().find('a').attr('title', '축소됨');
$(this).attr('title', '확장됨');
});
//탭 웹접근성 focus 처리
$(document).on('keydown', function (event) {
if (event.type == 'keydown') {
if(event.keyCode == '9'){ //tab
$(topWrap + ' ' + tabBox + ' li.active' + ' > a').focusin(function(){
idx = $(this).parents('li').index();
$activeTitTab = $(this);
$activeParents = $activeTitTab.parents(topWrap);
$activeParents.addClass('tab-ready');
});
$(topWrap + ' ' + tabBox + ' li.active' + ' > a').focusout(function(){
idx = $(this).parents('li').index();
$activeTitTab = $(this);
$activeParents = $activeTitTab.parents(topWrap);
$activeParents.removeClass('tab-ready');
});
}
if (!event.shiftKey && event.keyCode == '9') { //tab
if($activeParents){
if ($activeParents.hasClass('tab-ready')){
self.tabReady(opt);
} else if ($activeParents.hasClass('tab-end')){
self.tabEnd(opt);
}
}
}
}
});
$(document).on('keydown', topWrap + ' ' + tabBox + ' > li > a', function(event) {
if (event.keyCode == '13') {
idx = $(this).parents('li').index();
$activeTitTab = $(this);
$activeParents.addClass('tab-ready');
$activeParents.find(tabContent).find('a').removeAttr('tabindex');
}
});
if(opt.activateLater) { //사용자 정의 함수 실행
opt.activateLater();
}
},
tabReady: function(opt) {
//tabBox에 포커스
if($activeParents.find(tabBox + ' li.active' + ' > a').is(':focus') == true){
//tabContent 링크로 포커스
setTimeout(function(){
if($activeParents.find(tabContent + ' > div.active').find('a').length > 0){ //active 탭콘텐츠에 링크가 있을 때
$activeParents.find(tabContent).find('a').removeAttr('tabindex');
$activeParents.find(tabContent + ' > div.active a:eq(0)').focus();
$activeParents.removeClass('tab-ready');
//tabContent의 마지막 링크에 포커스
$activeParents.find(tabContent + ' > div').find('a:last').focus(function(){
setTimeout(function(){
$activeParents.addClass('tab-end');
});
});
} else { //active 탭콘텐츠에 링크가 없을 때
$activeParents.find(tabContent + ' > div.active').focus();
$activeParents.removeClass('tab-ready');
$activeParents.addClass('tab-end');
}
});
}else if($activeParents.find(tabBox + ' li:not(.active) > a').is(':focus') == true){
$activeParents.find(tabContent).find('a').attr('tabindex', '-1');
}
},
tabEnd: function(opt) {
$activeParents.removeClass('tab-end');
if($activeParents.find(tabContent + ' > div.active').next('div').find('a').length > 0){ //active 탭콘텐츠 다음 콘텐츠에 링크가 있을 때
if($activeParents.find(tabContent + ' > div.active').find('a').length > 0){ //active 탭콘텐츠(현재)에 링크가 있을 때
$activeParents.find(tabContent + ' > div.active').find('a:last').focusout(function(){ //.tab-box로 회귀
setTimeout(function(){
$activeParents.find(tabBox + ' > li.active').next('li').find('a').focus();
$activeParents.addClass('tab-ready');
});
});
} else { //active 탭콘텐츠(현재)에 링크가 없을 때
setTimeout(function(){
$activeParents.find(tabContent + ' > div').attr('tabindex', '-1');
$activeParents.find(tabBox + ' > li.active').next('li').find('a').focus();
$activeParents.addClass('tab-ready');
});
}
} else { //active 탭콘텐츠 다음 콘텐츠에 링크가 없을 때
setTimeout(function(){
$activeParents.find(tabContent + ' > div').attr('tabindex', '-1');
$activeParents.find(tabBox + ' > li.active').next('li').find('a').focus();
$activeParents.addClass('tab-ready');
});
}
if($activeParents.find(tabBox + ' li:not(.active) > a').is(':focus') == true){
setTimeout(function(){
$activeParents.find(tabContent).find('div').removeAttr('tabindex');
$activeParents.find(tabContent).find('a').attr('tabindex', '-1');
$activeParents.removeClass('tab-ready');
});
}else if($activeParents.find(tabBox + ' li:not(.active) > a').is(':focus') == false){
setTimeout(function(){
$activeParents.find(tabContent).find('div').removeAttr('tabindex');
$activeParents.find(tabContent).find('a').removeAttr('tabindex');
});
}
}
}
}();
비서실은 총장 및 부총장의 원활한 업무 수행에 필요한 보좌업무를 주목적으로 하며, 대외기관과의 소통, 대외관련 자료 수집 및 보고, 교내외 행사진행 보고, 바로바로센터 운영, 내빈 안내 및 의전 등의 업무를 담당합니다.
| 소속 | 담당업무 | 전화 |
|---|---|---|
| 총장실 비서실 | 비서실 총괄 | 063-220-2112 |
| 총장실 비서실 | 총장 수행(운전) | 063-220-2113 |
| 총장실 비서실 | 총장보좌, 일정관리, 내빈응대 | 063-220-2107 |
대학본관 406호