philc / philc/vimium

Also use aria-label when matching link hints

Open
#3,215 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

It would be great if Vimium also relied on the aria-label attribute when filtering link hints based on typeahead. There are some situations in which buttons or links don't have any text content, but are properly labelled for accessibility with aria-label, and those are sadly excluded from link hints filtering. A perfect example of that is the notification bell icon on GitHub itself.

I don't know much about CoffeeScript but I believe this could be done by adding:

else if element.hasAttribute "aria-label"
  linkText = element.getAttribute "aria-label"

Inside the generateLinkText function near: https://github.com/philc/vimium/blob/881a6fdc3644f55fc02ad56454203f654cc76618/content_scripts/link_hints.coffee#L852-L855.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in content_scripts/link_hints.coffee at the generateLinkText function near lines 852-855. Check how link text is selected when an element has no text content, then verify that typeahead filtering can use its aria-label, as with GitHub's notification bell link.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.