Skip to content
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

Description in Alert component #146

Closed
enguerranws opened this issue Jul 20, 2023 · 3 comments
Closed

Description in Alert component #146

enguerranws opened this issue Jul 20, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@enguerranws
Copy link
Collaborator

I'm using component to display feedback on action like this:

Capture d’écran 2023-07-20 à 10 44 49

As you can see, I'm using a unordered list to display errors (in that case). I have several cases like this where I want to provide feedback via an Alert component as separate items. That's not how the DSFR Alert component has been designed, as its description should simply be included in <p> tag (as per documentation : https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/alerte/).

The issue is that including <ul> in a <p> is not valid HTML (and produces warning in the console...).

Should we stick to the DSFR markup? Switch to a generic <div> instead of a <p> ? Maybe the DSFR team is ok with using an other tag than the <p>?

@enguerranws enguerranws added the question Further information is requested label Jul 20, 2023
@garronej
Copy link
Collaborator

Hello @enguerranws,

You are right. I don't know what's the best approach to tackle this though

@enguerranws
Copy link
Collaborator Author

enguerranws commented Jul 24, 2023

I did ask the DSFR team about this (https://mattermost.incubateur.net/betagouv/pl/pjiwmqbc8bb7znk86aqh49h8xc). It seems that the example in the doc is just a markup example, that can be adjusted (e.g. using an <ul> to show errors as list). I'll push something to adjust our component to handle it in a few days.

@enguerranws enguerranws self-assigned this Jul 24, 2023
@enguerranws
Copy link
Collaborator Author

PR to review: #148

sbourdon13 pushed a commit to sbourdon13/react-dsfr that referenced this issue Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants