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

[docs-infra] Fix Base UI API tabs layout regresions #41122

Open
2 of 8 tasks
oliviertassinari opened this issue Feb 15, 2024 · 6 comments
Open
2 of 8 tasks

[docs-infra] Fix Base UI API tabs layout regresions #41122

oliviertassinari opened this issue Feb 15, 2024 · 6 comments
Labels
accessibility a11y bug 🐛 Something doesn't work regression A bug, but worse scope: docs-infra Specific to the docs-infra product

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 15, 2024

Problem

#35938 introduced a number of UX problems that we didn't have before:

SCR-20240216-bpft

Context

As of today, I don't think that the tabs experience yields a stronger UX. We know it varies from person to person, so only talking for myself, it's not there.

I think that fixing these UX regressions would make it to the point where maybe it would be a superior UX for most people. I could understand why.

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: Base UI API tabs layout regresions

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer regression A bug, but worse scope: docs-infra Specific to the docs-infra product and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 15, 2024
@danilo-leal
Copy link
Contributor

danilo-leal commented Feb 20, 2024

  1. Broken Tabs aria-role on https://mui.com/base-ui/react-button/components-api/

About the last item on the list: I'm assuming we can only fix this if we change the approach from having the Tab render an <a> tag to rendering an actual <button>, right? I've tried to fix this issue, and from what I've looked around, it's very uncommon to have tabs with links instead of buttons. I'm also wondering if the item above (broken arrow navigation) has anything to do with this...

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Feb 20, 2024

it's very uncommon to have tabs with links instead of buttons

@danilo-leal I disagree, using links with tabs looks common to me. The closer the tabs is to the top of the page, the more likely its state should be stored in the URL. For example, we need to change from button to link in https://github.com/mui/mui-private/issues/392 for the tabs of the store product pages. Or on this very page, the top is a list of tabs with links: https://primer.style/components/tab-nav/react/alpha.

Or on https://hub.docker.com/repositories/, looks like they used the tabs as link

SCR-20240223-cetz

@danilo-leal
Copy link
Contributor

That's true, okay. But I'm more curious whether that's part of the problem with the wrong aria-role and keyboard navigation. For example, The Material UI tabs component — which is what we're using for the page's tabs — seems to be fine on these two aspects if the Tab is rendered as a button.

@danilo-leal
Copy link
Contributor

However, maybe the GitHub example is not the best as they don't seem to use role="tablist" both in the Primer docs and here. So, it visually looks like a Tabs component, but they're not intending it to be that way under the hood? Anyway, it makes me wonder even more about the question above...

@oliviertassinari
Copy link
Member Author

@danilo-leal I suspect an issue with Base UI Tabs component.

@danilo-leal
Copy link
Contributor

Yup, but those things are happening to the Material UI Tabs; it's what the page uses, so maybe there's a bug there, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y bug 🐛 Something doesn't work regression A bug, but worse scope: docs-infra Specific to the docs-infra product
Projects
Status: Backlog
Development

No branches or pull requests

2 participants