nextcloud-libraries / nextcloud-libraries/nextcloud-vue
Outline from `:focus-visible` on NcAction* items shows when it is not supposed to in Safari 🍏
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 246
- Forks
- 99
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 103
Description
Originally posted in https://github.com/nextcloud/server/issues/41450
Black border in "New" menu in Safari: There is a black border on the first entry of the "New" menu. It should only appear on tab navigation, not on initial opening or interacting with the mouse. → Bug with Safari, does not appear with Chrome.
Kind of regression https://github.com/nextcloud/server/pull/39943
When NcActions is open and on mouse move, an item is focused by .focus() method.
How it supposed to work in Web-Browser:
- If a user clicks on a focusable element and the focus is moved via
.focus(), the focused element should not be:focus-visible. - If a user clicks on a not focusable element and the focus is moved via
.focus(), the focused element should be:focus-visible.
So in NcActions on open and mouse move, the items ARE NOT SUPPOSED to be :focus-visible.
However, it doesn't work in Safari. Although this bug is fixed (https://bugs.webkit.org/show_bug.cgi?id=236782), it still appears in NcActions. Moving focus on Safari sometimes marks an element with :focus-visible. Moreover, sometimes a random action on the page changes this behavior and it works fine.
Somehow Safari doesn't understand, that the focus is moved after click on the button.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Safari behavior when NcActions opens and focus moves on mouse movement, comparing it with Chrome. Trace the focus handling in the NcActions component and verify that opening or mouse interaction does not show a :focus-visible outline, while keyboard navigation still does.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100