-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Improve hinting mechanism #1400
Comments
Great investigation, thanks!
|
ARIA roles are something to consider too. |
I would like to work on fixing this issue but I have a one question after checking the references mentioned above. Where does Vimium do better in detecting hintable elements ? I have checked the referenced function and It seems to include Shadow DOM and also there is the part where it checks whether the corners of the elements are clickable. But I still don't really understand the reason behind this so I would really appreciate if you could send me a reproducible case about these two points points or something else needed. In the other hand, the overlapping issue should've been fixed in #2820 . As for the selectors I will try to add those all while considering ARIA roles as mentioned above. |
Shadow DOM unawareness is severely lacking in our hinting mechanism, and help would be much appreciated if one knows what they're doing :) See #1828 for more context and examples. There's also #1526 which I'm trying to fix, and which would also benefit from some help in #2821.
Yeah, this one's weird, not sure what to do with it 🤔 |
I have made progress on the issue related to Shadow DOMs, I did inspire from the pull request you have mentioned which tackles IFrame hinting. However, I'm currently stuck somewhere and I wanted to ask for advice. I'm using almost the same function as the one you have added in this commit but for some reason when I inspect the values of
I tried to add I know this doesn't really make sense but I was wondering if you had any similar issues or if you could let me know how I can debug this, there might be a For reference here's the function I'm using: (export-always 'nyxt-node)
(defpsmacro nyxt-node (node)
"Get the DOM element via JavaScript, based on the data from the Lisp side DOM.
NODE should be a nyxt/dom element."
`(if (lisp (plump:root-p ,node))
(progn (chain console (log "true"))
(chain console (log (lisp (plump:root-p ,node))))
document)
(progn (chain console (log "false"))
(chain console (log (lisp (plump:root-p ,node))))
(labels ((get-by-ids (node ids)
(if (> (@ ids length) 1)
(get-by-ids
(ps:chain
(nyxt/ps:qs-nyxt-id node (elt ids 0)) shadow-root)
(chain ids (slice 1)))
(nyxt/ps:qs-nyxt-id node (elt ids 0)))))
(get-by-ids
document (lisp (coerce (mapcar (quote ,(uiop:find-symbol* :get-nyxt-id :nyxt/dom))
(uiop:symbol-call :nyxt/dom :shadow-root-parents ,node))
'vector))))))) |
@heiwiper I can't help much on this topic, but @aartaka may be able to help you. With respect to debugging, my advice is as follows. Write an HTML file that captures the feature you're developing. Start Nyxt with |
@heiwiper, I remember encountering this issue while working on IFrame support. In my case, the solution was to hard-code the |
I went through the ARIA roles in MDN and I came up with this list of roles that should be interactive:
I will try to work on adding support for these roles. |
@heiwiper, thanks for this huge work, it all makes sense! Will be glad to merge 😃 |
Our
hint-mode
can still be greatly improved. We need to hint more elements and be better at filtering false positives.Sources of inspiration:
The text was updated successfully, but these errors were encountered: