damianricobelli / stepperize

A library for creating step-by-step workflows in your apps
https://stepperize.vercel.app
916 stars 40 forks source link

"aria-describedby" and "aria-label" look invalid #27

Closed none23 closed 2 months ago

none23 commented 2 months ago

step.description is probably meant to be "aria-description"

"aria-describedby": step.description ?? step.id

Also step.id as "aria-label" looks like a bad idea:

"aria-label": step.title ?? step.id,
damianricobelli commented 2 months ago

The use of description and title as part of the supported values in the Step type is because the most common use case there will be in steppers is to have a title and a description. Reference --> https://mui.com/material-ui/react-stepper/#linear

Regarding your question: maybe it is better not to add any aria-label/description if there is no title/description, as the id can be a bit confusing depending on what the developer assigns as id

damianricobelli commented 2 months ago

We discussed this with @jonathantneal, another great contributor to the library and decided that these aria attr are outside the scope of the library and should be implemented by the developer.

So I will close this issue when we have the PR that removes these attrs 🤝

damianricobelli commented 2 months ago

Closed in favour of v2. We will soon add documents to generate the data-attr, but everything will be left more in the hands of the developer.