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

[BUG] - No option to change AccordionItem's title tag from h2 to something else #2950

Closed
parsasabetz opened this issue May 4, 2024 · 1 comment · Fixed by #2265
Closed
Milestone

Comments

@parsasabetz
Copy link

parsasabetz commented May 4, 2024

NextUI Version

2.2.9

Describe the bug

The AccordionItem component uses an h2 tag to render the title of the accordion item. This can ruin the SEO of a page since h2 is ranked right after h1.

There must be an option to change that specific tag to anything else, maybe a span or etc. Currently there is no option to change that and it is potentially harmful for the semantic ranking of the page...

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Simply use the Accordion and AccordionItem components and check the elements tab in your dev tools in the browser and you can see that the title given to the AccordionItem component is being rendered as an h2 tag.

Expected behavior

An option must exist to override the default (which is a very bold and careless choice to have h2 as default) h2 tag used by the AccordionItem component for rendering the accordion item title, to a less sensitive tag in the page.

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

Copy link

linear bot commented May 4, 2024

@parsasabetz parsasabetz changed the title [BUG] - No option to change AccordionItem main tag from h2 to something else [BUG] - No option to change AccordionItem's title tag from h2 to something else May 4, 2024
@jrgarciadev jrgarciadev added this to the v2.3.7 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants