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

Support <button> in mat-nav-list #13659

Closed
calebegg opened this issue Oct 17, 2018 · 6 comments
Closed

Support <button> in mat-nav-list #13659

calebegg opened this issue Oct 17, 2018 · 6 comments
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix G This is is related to a Google internal issue needs: discussion Further discussion with the team is needed before proceeding

Comments

@calebegg
Copy link
Member

<mat-nav-list> only supports <a> tags. Sometimes, a <button> would be more semantically appropriate; for example, the common "send feedback" menu item.

@jelbourn
Copy link
Member

Do you actually want the new <mat-action-list>?

The idea behind the different list variants is that they each provide a shortcut a specific a11y interaction pattern, with the long-form <mat-list> being dissociated with any specific interaction pattern so people can do something custom.

  • <mat-selection-list> is a role="listbox"
  • <mat-nav-list> is for role="navigation" plus anchors
  • <mat-action-list> doesn't have a direct analog, but it's roughly role="group" around a bunch of buttons

Recently on my radar is the idea of a <mat-menu-list>, which has the same visuals backed by role="menu" and role="menuitem"

In AngularJS Material, the <md-list> tried to be all of those things at once and the accessibility suffered for it, so the approach in this iteration is to provide specific, well-supported interaction patterns and a path where you define your own interaction pattern.

@jelbourn jelbourn added discussion G This is is related to a Google internal issue feature This issue represents a new feature or feature request rather than a bug or bug fix labels Oct 18, 2018
@calebegg
Copy link
Member Author

I think I do want a nav list. For my use case, it's in a <mat-sidenav>, and the other items are navigational <a> tags, so not appropriate for action list.

TBH, I don't really like the pattern of feedback being in the sidenav, but it's standard: https://material.io/design/communication/help-feedback.html

@crisbeto
Copy link
Member

The selector for mat-list-item does allow you to use a button, but we weren't doing the proper resets to get the buttons to look correctly. It'll be fixed in #13617.

@calebegg
Copy link
Member Author

Perfect, thanks!

@jelbourn
Copy link
Member

Closing this since I don't think there's any action to take.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
@mmalerba mmalerba added the needs: discussion Further discussion with the team is needed before proceeding label Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix G This is is related to a Google internal issue needs: discussion Further discussion with the team is needed before proceeding
Projects
None yet
Development

No branches or pull requests

4 participants