-
Notifications
You must be signed in to change notification settings - Fork 27
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: Different heading levels used for styling purposes instead of semantically on the home page #456
Comments
Nice catch. You're right that we can override any MUI styles with the It looks like, at least for the home screen, the issue is with our own styles. We're hard-coding the |
@milofultz - I completely understand the semantic linear idea, but what I have confusion on is where do you have to start? Do you always have to start with Answers to this and I can get started on this issue. @timbot1789 as well, MUI makes it much easier to do what we want to do here. If you want the text to look stylistically like an <Typography variant="h1" component="h2">
h1. Heading
</Typography> |
You usually only want a single
As far as what needs to be done, it's mainly just ensuring that the headers follow that linear structure. See the nesting example on MDN as an example of how things should be stacked. Another example, think of it as a "belongs to" relationship.
Think of them as structural items that help organize the content and you should be gucci 👍 |
understand all this completely. What I am asking is if an h1 HAS to be on every page, or can you start from any header level (like h2 or h3 for example) and work down linearly? |
Found it in |
Ah @xscottxbrownx , not trying to mansplain at you, my apologies. Let me know if you have any more questions |
@milofultz have one more question for you... Do you have any suggestions for pages that don't logically have an |
@xscottxbrownx There should always be an
So no need to .sr-only {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
|
@milofultz could you Friend request on Discord, to make this convo a little easier? I've got just a couple ideas to run by you - thinking about this for all the pages. |
Hey @xscottxbrownx , I thought I friended you on Discord, but now I'm not so sure 🙃 . What is your username? You can shoot me a message too at |
Found you and sent message - username: veganedge |
Going through this again and noticing that some headings were downgraded to just |
Bug Description:
Heading levels are used in ways to affect their styling and not being used semantically. This leads to poor experiences for users of assistive technologies. See MDN's notes on navigation using headings.
Reproduction Steps:
1. Go to the home page and turn on your screen reader (Voiceover, in this instance).
2. Go to the list of headings (using the rotor in Voiceover)
3. Note that they are not linear (e.g. 2, 5, 2, 5; instead of 2, 3, 2, 3)
What should be expected is a linear tree of heading levels. Each child should be a direct descendant of the parent (e.g. an
<h2>
element can only have succeeding<h3>
s as direct children).Screenshots (If applicable):
Screenshots are from this extension.
Possible Solution (optional):
Use CSS to style elements using something like a class name or the tag name itself (for example,
.subheader
or applied directly toh2
) and modify this based on zoom level, width of browser, etc.This would likely mean we need to decouple our styling from the MUI
Typography
component. Unsure how this is done, but I see thesx
prop.Thinking it would probably make sense to either make components that are styled correctly that we can then apply a heading level to, or something of that nature, to make a more modular and more easily maintained structure (if these styles are only used in small parts of the app, I don't want to go full design system and build out unnecessary infra).
The text was updated successfully, but these errors were encountered: