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

♿ AVT 3 ♿ Overflow menu should support links as menu items #1615

Closed
dakahn opened this issue Jan 10, 2019 · 9 comments
Closed

♿ AVT 3 ♿ Overflow menu should support links as menu items #1615

dakahn opened this issue Jan 10, 2019 · 9 comments
Assignees
Labels
role: dev 🤖 type: a11y ♿ version: 10 Issues pertaining to Carbon v10

Comments

@dakahn
Copy link
Contributor

dakahn commented Jan 10, 2019

The menu items of an overflow menu could be used for navigation. In this case the user expects to be read a link and not a button. A link element should be supported alongside a button since in the case of navigation it is more semantically correct and in line with user expectation.

Reference

Links vs. Buttons in Modern Web Applications

@lauraalkhoury
Copy link

lauraalkhoury commented Jan 16, 2019

Something I just noticed (in React)

In the OverflowMenu, when you have an entry that is an <a href=“…” /> that navigates to a new page, that is activated/selected with the enter key. When you have an entry that is a <button /> that, say, takes an action on the current page, that’s activated/selected with the spacebar.

The net is that you end up with an overflow menu where some items are activated via space and some are activated via enter.

@carmacleod
Copy link
Contributor

@dakahn So in the case that @lauraalkhoury describes, both link and button should be activated by both space and enter. (So that the user isn't confused).

@aagonzales
Copy link
Member

aagonzales commented Jan 23, 2019

Can someone show me an example of where you would have a link instead of an action (button) in the overflow menu? Originally, the overflow menu was only meant for actions (buttons).

If there is a good reason to include links then I think we would want to style the links differently than the actions incase they are ever shown together.

@lauraalkhoury
Copy link

@aagonzales in the case that you want a menu item in your overflow menu to navigate to a new page - for instance, the IBM Cloud Pipeline team has an overflow menu like this:

screen shot 2019-01-24 at 9 13 03 am

where the "Configure pipeline" item navigates to https://example-pipeline-url.com/config, essentially the settings page. We have a few instances of this in our UI.

@dakahn it seems like in carbon-components-react, there was functionality recently added so that when the user adds the href prop to an OverflowMenuItem, it renders the item as:

 <li><a></a></li>

instead of:

 <li><button></button></li>

So it seems some work has been done to support links as menu items.

@lauraalkhoury
Copy link

here's the PR for the link as menu item functionality I mentioned: carbon-design-system/carbon-components-react#1630

@aagonzales
Copy link
Member

I think adding the "launch out" icon at the end of links will help users know that its going to take them someplace.

image

@dakahn
Copy link
Contributor Author

dakahn commented Jan 29, 2019

I'll close this since it looks like this functionality has been implemented. Happy to open it up again and continue discussion if we want to though 🏄🏼‍♂️

@dakahn dakahn closed this as completed Jan 29, 2019
@lauraalkhoury
Copy link

@dakahn should I open up a separate issue for this problem from my comment above I found in the overflow menu with links vs buttons?

The net is that you end up with an overflow menu where some items are activated via space and some are activated via enter.

It seems like that is still an issue.

@dakahn
Copy link
Contributor Author

dakahn commented Jan 29, 2019

Absolutely 😸 thank you so so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: dev 🤖 type: a11y ♿ version: 10 Issues pertaining to Carbon v10
Projects
None yet
Development

No branches or pull requests

4 participants