feat: 접근성 검사 표준 선택 기능 — WCAG/KWCAG 버전별 선택 지원
3가지 검사 모드(한 페이지, 사이트 크롤링, 목록 업로드) 모두에서 접근성 표준을 선택할 수 있도록 추가. WCAG 2.0 A/AA, 2.1 AA, 2.2 AA와 KWCAG 2.1, 2.2를 지원하며, KWCAG 선택 시 axe-core 결과를 KWCAG 검사항목으로 자동 매핑. - KWCAG 2.2 (33항목) / 2.1 (24항목) ↔ WCAG 매핑 테이블 (kwcag_mapping.py) - AccessibilityChecker에 표준 파싱 및 KWCAG 변환 로직 추가 - 전체 API 파이프라인에 accessibility_standard 파라미터 전파 - 프론트엔드 3개 폼에 공용 표준 선택 드롭다운 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -73,6 +73,7 @@ async def start_batch_inspection(
|
||||
file: UploadFile = File(...),
|
||||
name: str = Form(...),
|
||||
concurrency: int = Form(default=4),
|
||||
accessibility_standard: str = Form(default="wcag_2.1_aa"),
|
||||
):
|
||||
"""
|
||||
Start a new batch inspection from an uploaded URL file.
|
||||
@ -154,6 +155,7 @@ async def start_batch_inspection(
|
||||
name=name,
|
||||
urls=urls,
|
||||
concurrency=concurrency,
|
||||
accessibility_standard=accessibility_standard,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error("Failed to start batch inspection: %s", str(e))
|
||||
|
||||
@ -55,7 +55,10 @@ async def start_inspection(request: StartInspectionRequest):
|
||||
service = _get_service()
|
||||
|
||||
try:
|
||||
inspection_id = await service.start_inspection(url)
|
||||
inspection_id = await service.start_inspection(
|
||||
url,
|
||||
accessibility_standard=request.accessibility_standard,
|
||||
)
|
||||
except httpx.HTTPStatusError as e:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
|
||||
@ -67,6 +67,7 @@ async def start_site_inspection(request: StartSiteInspectionRequest):
|
||||
max_pages=request.max_pages,
|
||||
max_depth=request.max_depth,
|
||||
concurrency=request.concurrency,
|
||||
accessibility_standard=request.accessibility_standard,
|
||||
)
|
||||
except httpx.HTTPStatusError as e:
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user