blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
7.06k stars 414 forks source link

Add toggle to turn off `aria-labels` on links generated by Dataview #777

Open chrisgrieser opened 2 years ago

chrisgrieser commented 2 years ago

Is your feature request related to a problem? Please describe. When using the Supercharged Links Plugin, you can use some CSS trickery to basically create custom tooltips. However, this conflicts when the links are generate by dataview, since they automatically get a tooltip already (via aria-label).

Describe the solution you'd like A simple toggle to stop dataview from assigning aria-labels to links would solve this.

Describe alternatives you've considered Removing tooltips via CSS, but as far as I can tell, you can only remove tooltips entirely in Obsidian, which isn't really desirable.

Additional context I know this is a bit of a niche case, but I assume turning of aria labels isn't hard to implement, so I hope this gets implemented as it's a low-hanging fruit 🙏

blacksmithgu commented 2 years ago

Dataview doesn't add aria-label explicitly, it just defaults to whatever Obsidian does, which appears to add the label - does this work with normal (non-Dataview) links?

chrisgrieser commented 2 years ago

Have a look here. Normal wikilinks do not have any tooltip, while the ones from dataview do.

https://user-images.githubusercontent.com/73286100/149745912-8de225ec-cca5-4dbe-9a5a-bdf43bc3e04b.mov

blacksmithgu commented 2 years ago

I saw this locally as well; this is pretty wierd, since I use MarkdownRenderer#renderMarkdown, which is an Obsidian API call. The best I could do here is to special-case link rendering and try to manually delete the fields if I see them, though it won't work in all cases.