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-bug(mat-tab-nav-panel): Documentation implies that [tabPanel] is optional, but must be specified. #26270
Comments
Please fix this. We have been using a standalone tab panel for navigation ie footer of our app for years. We use in combination with router links to go between pages when you click or activate a tab. Looks like just these lines need to be removed. components/src/material/tabs/tab-nav-bar/tab-nav-bar.ts Lines 383 to 388 in 1fcdc27
The rest of the component works with an optional tabPanel. |
@wagnermaciel would you accept a PR for changes described in my comment? It's common to use tabs as nav. |
I agree with @epelc, these line should be removed to fit the documentation. |
Does anyone know of any workaround to force [tabPanel] to be optional? We don't want to use [tabPanel] style tabs, because it'll cause us a lot of accessibility problems. (For example, the z-index is set to -1 on all tabs, instead of 0. As well, our mat-tab-nav-panel is buried deep in a component, and providing it with a tabPanel that includes the router-outlet is... difficult.) |
+1 to everything above. @EliezerB123 I believe the workaround here is to simply have an empty
That will appease the error while not requiring you to change your page structure/rendering behavior. |
Documentation Feedback
The documentation implies that [tabPanel] can be left unprovided by saying "If not provided, then the nav bar follows the ARIA link / navigation landmark pattern".
However, if left unprovided, it will throw an error stating: "A mat-tab-nav-panel must be specified via [tabPanel]".
Affected documentation page
https://material.angular.io/components/tabs/api#MatTabNav
The text was updated successfully, but these errors were encountered: