-
Notifications
You must be signed in to change notification settings - Fork 85
Experimental version of new slash inputs #1396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
pplancq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je pense que le core/HelpMessage.tsx ne devrait pas être dans cette PR si ?
|
|
||
| const errorId = isInvalid ? `${inputId}-description` : undefined; | ||
| const helperId = props.helpMessage ? `${inputId}-helper` : undefined; | ||
| const describedBy = [errorId, helperId].filter(Boolean).join(" ").trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je pense que le errorId devrait être mis dans aria-errormessage (pris en charge par ANDI et NVDA)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lors de notre formation accessibilité, on nous avait mis en garde sur aria-errormessage et son manque de support :
https://cerovac.com/a11y/2024/06/support-for-aria-errormessage-is-getting-better-but-still-not-there-yet/
C'est une feature assez récente et les lecteurs d'ecran ne supportent pas tous cette propriété
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perso NVDA le supporte bien car coté client on utilise déjà aria-errormessage mais du coup s'il faudrait ne pas l'utilisé il faudrait comme ce synchro coté agent et client histoire d'être iso dans les 2 DS.
| const inputUseId = useId(); | ||
| const inputId = props.id ?? inputUseId; | ||
|
|
||
| const isInvalid = Boolean(props.errorMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il faudrait retourne undefined si Boolean(props.errorMessage) = false car je pense que c'est pas utile de mettre un aria si pas utile
idem pour describedBy
aria less is best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu voudrais que cette ligne retourne undefined si les 2 sont undefined, c'est ca ?
const describedBy = [errorId, helperId].filter(Boolean).join(" ").trim();There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
en gros oui, car perso mettre un arria-describedBy='' je trouve cela inutile. tous comme un aria-invalid="false" etc ...
on peut en discuter pendant un point de synchro ou autre au besoin.
| import "@axa-fr/design-system-slash-css/dist/Form/Experimental/HelpMessage.css"; | ||
| import icon from "@material-symbols/svg-400/sharp/error-fill.svg"; | ||
| import classNames from "classnames"; | ||
| import { PropsWithChildren } from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { PropsWithChildren } from "react"; | |
| import { type PropsWithChildren } from "react"; |
| @@ -0,0 +1,7 @@ | |||
| import "@axa-fr/design-system-slash-css/dist/Form/Experimental/InputUnit.css"; | |||
|
|
|||
| import { PropsWithChildren } from "react"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { PropsWithChildren } from "react"; | |
| import { type PropsWithChildren } from "react"; |
| @@ -0,0 +1,21 @@ | |||
| import "@axa-fr/design-system-slash-css/dist/Form/Experimental/InputContainer.css"; | |||
| import classNames from "classnames"; | |||
| import { PropsWithChildren } from "react"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import { PropsWithChildren } from "react"; | |
| import { type PropsWithChildren } from "react"; |
| @@ -0,0 +1,11 @@ | |||
| .af-label { | |||
| margin-bottom: var(--label-margin-bottom, 0); | |||
| grid-area: label; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je me demande s'il ne serais pas plus logique de mettre le grid-are dans l'input-container
fb81e46 to
9e92801
Compare
|
9e92801 to
09565e4
Compare
…es (#1509) * fix(look&feel,apollo): ensure overflow is hidden in progress bar styles * fix(apollo,look&feel): import Stepper from apollo/lf in the story * feat(look&feel,apollo): set to ProgressBar a progress value border radius
* feat(apollo,look&feel): tabbar migration * docs(apollo,look&feel): update documentation * test(apollo,look&feel): add test with Reactnode content for TabBar
* chore(design-system): update package-lock.json * refactor(design-system): fix styles lint in InputTextAtomCommon.css and Accordion.scss * chore(design-system): update action.yaml for node setup * chore(design-system): update package-lock.json * chore(design-system): update node version in volta configuration * fix(slash): update label and select element IDs in snapshot
|
09565e4 to
a32d93c
Compare
a32d93c to
052f202
Compare


In order to add the possibility to have both a helper text and an error message we need to break the API of our inputs.
Since this is required, this code is an experiment of an overhaul of our inputs components. Less reliant on the magic of the Field component, and based on sensible atoms to allow users to easily create their own inputs controls.