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

feat(@vtmn/css, @vtmn/react, @vtmn/svelte, @vtmn/vue): Improve VtmnAlert component #1463

Closed
ThomasPierreDECATH opened this issue Sep 27, 2023 · 6 comments
Assignees
Labels
community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community CSS 🎨 Related to CSS styles packages React 🔵 Related to React components library Svelte 🟠 Related to Svelte components library Vue 🟢 Related to Vue components library

Comments

@ThomasPierreDECATH
Copy link

Describe the bug
We want to use the Alert component into a page but not sticky. In order to to that we need to import VtmnAlertItem but it is not exported for the moment

This component could be impoved by :

  • Replace the <div/> by <dialog/> HTML tag
  • tabindex should be exported as a prop in order to allow user to focus on the Alert
  • Set an ID on the title and the content
  • Set aria-labelledby with title ID on the <dialog/>
  • Set aria-describedby with content ID on the <dialog/>
  • Allow Alert to be 100% wide on mobile (90% now)
@ThomasPierreDECATH ThomasPierreDECATH added the bug 🐛 Something isn't working label Sep 27, 2023
@Tlahey
Copy link
Contributor

Tlahey commented Sep 27, 2023

I take it
Also set 2 slots (like the VtmnAccordion)

  • One for the title
  • One for the description

@Tlahey Tlahey self-assigned this Sep 27, 2023
@Tlahey Tlahey added React 🔵 Related to React components library Svelte 🟠 Related to Svelte components library Vue 🟢 Related to Vue components library community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community and removed bug 🐛 Something isn't working labels Sep 27, 2023
@lauthieb lauthieb changed the title feat(@vtmn/Alert): Improve Alert component feat(@vtmn/css, @vtmn/react, @vtmn/svelte, @vtmn/vue): Improve Alert component Sep 27, 2023
@lauthieb lauthieb added the CSS 🎨 Related to CSS styles packages label Sep 27, 2023
@lauthieb lauthieb changed the title feat(@vtmn/css, @vtmn/react, @vtmn/svelte, @vtmn/vue): Improve Alert component feat(@vtmn/css, @vtmn/react, @vtmn/svelte, @vtmn/vue): Improve VtmnAlert component Sep 27, 2023
@Tlahey
Copy link
Contributor

Tlahey commented Sep 28, 2023

ping @lauthieb it seems ok for you ?
No breaking changes

@lauthieb
Copy link
Member

Thanks @ThomasPierreDECATH for your issue & @Tlahey for your answer.
@Tlahey I'll let you check directly with @thibault-mahe for confirmation, but if there are no breaking changes, it could be okay yes :)

@Tlahey
Copy link
Contributor

Tlahey commented Sep 28, 2023

Linked PR #1464

@Tlahey
Copy link
Contributor

Tlahey commented Sep 28, 2023

For informations

  • Replace the <div/> by <dialog/> HTML tag
    -- > Checked on https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/examples/alertdialog/ the role alert is a div, we keep this synthax.
  • tabindex should be exported as a prop in order to allow user to focus on the Alert
    -- > For a11y a role alert must have a negative tabindex
  • Set an ID on the title and the content -
    -- > Not necessary, the role alert don't have an aria-labelledby / describedby
  • Set aria-labelledby with title ID on the
    -- > Same above
  • Set aria-describedby with content ID on the
    -- > Same above
  • Allow Alert to be 100% wide on mobile (90% now)
    -- > Must be specific to the application that uses it

@Tlahey
Copy link
Contributor

Tlahey commented Oct 5, 2023

We can close this issue

@lauthieb lauthieb closed this as completed Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community CSS 🎨 Related to CSS styles packages React 🔵 Related to React components library Svelte 🟠 Related to Svelte components library Vue 🟢 Related to Vue components library
Projects
None yet
Development

No branches or pull requests

3 participants