diff --git a/components/index.html b/components/index.html index 615c223..469a90f 100644 --- a/components/index.html +++ b/components/index.html @@ -21,17 +21,17 @@

KRDS Component Library

Button

.krds-btn · Figma Action/Button 36:67

- - - - - - + + + + + +
- - - + + +
@@ -92,8 +92,8 @@

Badge & Tag

Danger
- 필터 A - 필터 B + 필터 A + 필터 B
@@ -102,9 +102,9 @@

Tabs

.krds-tabs · Figma Layout/Tabs 59:11

- - - + + +
개요 패널 내용입니다.
@@ -155,7 +155,7 @@

Alert

Toast

.krds-toast · Figma Feedback/Toast 56:46

-
저장되었습니다.
+
저장되었습니다.
diff --git a/tests/test_component_gallery_security.py b/tests/test_component_gallery_security.py index 8eaf9e4..077db9d 100644 --- a/tests/test_component_gallery_security.py +++ b/tests/test_component_gallery_security.py @@ -82,3 +82,11 @@ def test_component_gallery_inputs_have_length_limits() -> None: if 'type="checkbox"' in inp or 'type="radio"' in inp: continue assert 'maxlength=' in inp, f"Input missing maxlength: {inp}" + + +def test_component_gallery_buttons_have_explicit_type() -> None: + """Ensure all buttons explicitly define a type to prevent accidental form submissions.""" + html = _gallery_html() + buttons = re.findall(r']*>', html) + for btn in buttons: + assert 'type=' in btn, f"Button missing explicit type: {btn}"