Skip to content

Commit be282fb

Browse files
committed
fix: W3C html semantic errors
1 parent 1d89351 commit be282fb

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

src/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export const Header = memo(
375375
)}
376376
>
377377
<button
378-
id={`${id}-search-button`}
378+
id={`${id}-search-close-button`}
379379
className={fr.cx("fr-btn--close", "fr-btn")}
380380
aria-controls={searchModalId}
381381
title={t("close")}

src/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const Input = memo(
160160
classes.nativeInputOrTextArea
161161
)}
162162
disabled={disabled || undefined}
163-
aria-describedby={messageId}
163+
aria-describedby={state !== "default" ? messageId : undefined}
164164
type={textArea ? undefined : nativeInputProps?.type ?? "text"}
165165
id={inputId}
166166
/>

src/Modal/Modal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const Modal = memo(
6262
return (
6363
<dialog
6464
aria-labelledby={titleId}
65-
role="dialog"
6665
id={id}
6766
className={cx(fr.cx("fr-modal", topAnchor && "fr-modal--top"), className)}
6867
style={style}

0 commit comments

Comments
 (0)