ui icon indicating copy to clipboard operation
ui copied to clipboard

as property from reka-ui components

Open kubilaymelnikov opened this issue 9 months ago • 2 comments

Description

Hi everyone, would it be possible to make the as property of reka-ui components configurable via the UI config or as a prop in the main component? For example, it would be great if we could set an AccordionHeader to render as a div instead of an h3, or an AccordionTrigger as something other than a button.

I also tried to override the component directly, but importing from app.config in the first

Additional context

No response

kubilaymelnikov avatar Apr 02 '25 14:04 kubilaymelnikov

@kubilaymelnikov You can already customize most of the props :as of main components, in any case where there would be an "interest", all components are made to be accessible and following good practices. Modifying them as you describe would potentially introduce accessibility errors. Can you explain a little more what benefits you would have?

HugoRCD avatar Apr 09 '25 10:04 HugoRCD

@HugoRCD; This setting is important and relevant to properly define the HTML schema. Depending on the layout, the accordion tab may contain more than just a headline, such as additional information. From both an SEO and HTML schema perspective, wrapping everything inside an h3 tag can be counterproductive.

In our case, we use a custom-designed headline along with a teaser text. However, in other scenarios, it might make sense to use an h4 or even omit a heading tag entirely if it is not required for an SEO-optimized structure.

kubilaymelnikov avatar Apr 09 '25 10:04 kubilaymelnikov

Hi! šŸ‘‹

This issue has been automatically closed due to prolonged inactivity.

We're a small team and can't address every report, but we appreciate your feedback and contributions.

If this issue is still relevant with the latest version of Nuxt UI, please feel free to reopen or create a new issue with updated details.

Thank you for your understanding and support!

— Nuxt UI Team

github-actions[bot] avatar Jun 18 '25 09:06 github-actions[bot]