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

Hardcoded heading levels in components cause Accessibility problems #3118

Open
bvo-sf opened this issue Jun 9, 2023 · 2 comments
Open

Hardcoded heading levels in components cause Accessibility problems #3118

bvo-sf opened this issue Jun 9, 2023 · 2 comments

Comments

@bvo-sf
Copy link

bvo-sf commented Jun 9, 2023

There are components in the DSR project that uses hardcoded heading tags which causes issues with illogical heading orders.
Axe-core rule

Ex:

<h1> First Heading </h1>
<SetupAssistant ...>
 <SetupAssistantStep
  header={(<h2>Should be a h2 tag</h2>)}
  ...
 /> 
</SetupAssistant>

SetupAssistantStep generates a parent <h3> and renders the heading prop as a child, breaking the logical ordering of headings. The tag is rendered on this line.

This scenario can also be found in the Tree Component

Beyond updating the components in DSR, I do not see a way to maintain a logical heading order.

@welcome
Copy link

welcome bot commented Jun 9, 2023

Thanks for opening your first issue! 👋
If you have found this library helpful, please star it. A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.

@bvo-sf
Copy link
Author

bvo-sf commented Jun 9, 2023

Suggestion: The heading tags should be changed to a more general tag span, div, ect to allow developers the option to specify the heading as a prop.

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

No branches or pull requests

1 participant