+
@@ -157,20 +158,16 @@ export default function DateField(props: DateFieldProps) {
ref={buttonRef}
onPress={handleButtonPress}
type="button"
+ aria-haspopup="dialog"
size="XXS"
+ aria-expanded={isPopperOpen}
+ aria-controls={isPopperOpen ? id : undefined}
aria-label={t(
- 'design-system.date-picker.choose-date',
- 'Choisir une date'
+ 'design-system.date-picker.open-selector',
+ 'Ouvrir le sélecteur de date'
)}
>
-
+
@@ -178,26 +175,30 @@ export default function DateField(props: DateFieldProps) {
{
+ if (e.key === 'Escape') {
+ closePopper()
+ }
+ }}
+ aria-label="Calendrier de selection de date"
>
)}
-
+
)
}
@@ -221,9 +222,9 @@ const StyledBody = styled(Body)`
theme.darkMode ? theme.elevationsDarkMode[2] : theme.elevations[2]};
`
-const Container = styled.div``
-
const Wrapper = styled.div`
+ display: flex;
+ align-items: center;
position: relative;
`
@@ -231,7 +232,7 @@ const StyledButton = styled(Button)`
max-width: 55px;
position: absolute;
right: 0;
- top: 0;
+
margin: 0.5rem;
`
diff --git a/site/source/design-system/field/TextField.tsx b/site/source/design-system/field/TextField.tsx
index c8180e438..93ff4358b 100644
--- a/site/source/design-system/field/TextField.tsx
+++ b/site/source/design-system/field/TextField.tsx
@@ -112,7 +112,7 @@ export const StyledDescription = styled(ExtraSmallBody)`
padding: ${({ theme }) => `${theme.spacings.xxs} ${theme.spacings.sm}`};
will-change: color;
transition: color 0.2s;
- margin-top: 0;
+ margin-top: ${({ theme }) => `${theme.spacings.xs}`};
`
export const StyledErrorMessage = styled(StyledDescription)`
diff --git a/site/source/pages/assistants/declaration-revenu-independants/components/DéclarationRevenu.tsx b/site/source/pages/assistants/declaration-revenu-independants/components/DéclarationRevenu.tsx
index c9828a3fc..82fe9bd84 100644
--- a/site/source/pages/assistants/declaration-revenu-independants/components/DéclarationRevenu.tsx
+++ b/site/source/pages/assistants/declaration-revenu-independants/components/DéclarationRevenu.tsx
@@ -54,10 +54,7 @@ const RuleInputWithTitle = ({
`}
>
{title}
-
+
)}