octopusthink / nautilus

Inclusive, open-source design system and React component library.
https://nautilus.octopusthink.com
MIT License
2 stars 0 forks source link

fix: Hide tab headings. #235

Closed sarahmonster closed 4 years ago

sarahmonster commented 4 years ago

Visually, these don't make sense to show since the tab itself already provides this context. My suspicion is that we'd always intended to hide these, but perhaps didn't originally for lack of a VisuallyHidden component? Maybe?

Before:

Screenshot 2020-06-01 at 21 40 24

After:

Screenshot 2020-06-01 at 21 40 40

We're also switching it from a heading to a tab to ensure consistent heading hierarchy. If we wanted to stick with headings, I might recommend opting for something higher, like an h2, which is more likely to work with the page hierarchy, or pass a prop to declare the heading level. I could see the value in showing these as headings, so I'm not sure about the Paragraph approach here—maybe instead we should make them h1s or h2s by default, but allow users to pass through a different heading level if needed?