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

Middle click to file/folder open in new tab #2317

Closed
PVince81 opened this issue Oct 23, 2019 · 8 comments
Closed

Middle click to file/folder open in new tab #2317

PVince81 opened this issue Oct 23, 2019 · 8 comments
Labels
Milestone

Comments

@PVince81
Copy link
Contributor

When clicking on a folder with middle click or right click + open in the new: it should open the file app in the clicked folder into a separate tab. (this was the case with OC 10)

For files, we should think whether we also open the editor there. This would require a default action.

@PVince81 PVince81 added the Category:Enhancement Add new functionality label Oct 23, 2019
@PVince81 PVince81 added this to the backlog milestone Oct 23, 2019
@PVince81 PVince81 changed the title Middle click to open in new tab Middle click to file/folder open in new tab Oct 23, 2019
@LukasHirt
Copy link
Collaborator

Also, consider making the name link/button. I guess without it it could be an accessibility issue. @marcus-herrmann pls clarify.

@marcus-herrmann
Copy link
Contributor

marcus-herrmann commented Oct 23, 2019

For that behavior for folders the trigger needs to be a link, linking to the route with the folders contents: e.g. https://phoenix.owncloud.com/custom/phoenix/index.html#/files/list vs https://phoenix.owncloud.com/custom/phoenix/index.html#/files/list/First.

For files I think it should be a button, given a click will make the oc-file-actions dialog visible everytime (right? Or are there occasions where a file will be downloaded directly? In this case it should be a link again, with a download attribute).

Right now both file and folder triggers are not interactive, semantically speaking. Assistive technology cannot detect that there's a click event listener on the <span>.

Rule of thumb when it comes to links vs. button:

  • Does it open/expand/show something, or changes state of the app? -> Button
  • Does it lead somewhere? -> Link

(A great presentation about the "duel" of the elements

@PVince81
Copy link
Contributor Author

There are at least three possible actions:

  1. For a file, if it's a known file type and there's an editor registered: open the editor. (in the current implementation it will show a footer with a list of actions, but this might change, needs to be discussed)
  2. For a file, if unknown type: download
  3. For a folder: navigate into folder.

The above is for left click.
For middle click I'd expect the same behavior but happening in a separate folder.

If we use a button there it is likely that middle click will not work ?

@marcus-herrmann
Copy link
Contributor

@PVince81 The concept of "Middle click" is not standardized in any way, I'm not sure what you are refering to exactly.

@PVince81
Copy link
Contributor Author

@marcus-herrmann with "middle click" I mean "open in new tab" which is also accessible from the context menu. In general that functionality only works for links that have an href defined

@marcus-herrmann
Copy link
Contributor

  1. For a file, if it's a known file type and there's an editor registered: open the editor.

If a state, in this case a particular file, has an unique URL, a link should be used. Currently in phoenix that is not the case, so the "editor" trigger should be a button.

  1. For a file, if unknown type: download

<a href="/some/path/file.whatever" download>Herunterladen</a>

  1. For a folder: navigate into folder.

<a href="index.html#/files/list/myfoldername">Myfoldername</a>

If we use a button there it is likely that middle click will not work ?

If middle click maps to open in new tab: correct. As you said: only links can be opened in new tabs/windows.

(in the current implementation it will show a footer with a list of actions, but this might change, needs to be discussed)

If this usage pattern stays there will be urgent need for focus management in this case if the "actions" can't be solved with the disclosure widget pattern (as of now "actions" has more of a "dialog character")

@marcus-herrmann
Copy link
Contributor

@PVince81 Stepping one step back: I would label adding the correct semantics for folder and file controls not as enhancements, but crucial, therefore "Bug". As of now the File/Folder controls are not operable via Screen Reader or keyboard.

@kulmann
Copy link
Member

kulmann commented Jul 18, 2024

Superseded by more recent #11222

@kulmann kulmann closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants