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

Ability to set an icon's aria-label / tooltip #572

Open
chrisgurney opened this issue Oct 2, 2024 · 0 comments
Open

Ability to set an icon's aria-label / tooltip #572

chrisgurney opened this issue Oct 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@chrisgurney
Copy link

chrisgurney commented Oct 2, 2024

Is your feature request related to a problem? Please describe.

For context, I'm creating buttons for actions within my notes, using Lucide icons. They look great.

An example:

[:LiTableProperties:](obsidian://...)

When hovering over the icon, however, it shows the name of the icon "LiTableProperties" which is set in the cm-iconize-icon span's aria-label. This isn't particularly helpful in conveying what clicking on the icon will do when clicked.

Describe the solution you'd like

The ability to add aria-labels to icons would be great.

The same example, with possible notation:

[:LiTableProperties "Toggle properties":](obsidian://...)

...would set the aria-label in the cm-iconize-icon span to "Toggle properties", and thus hovering over the icon it would now display a more helpful "Toggle properties".

I've sort of taken inspiration for the notation from what John Gruber had suggested here and is in CommonMark (which Obsidian does not natively support from what I can tell... otherwise I could maybe use that).

Additional context

Current state:
CleanShot 2024-10-02 at 10 26 55@2x

Desired outcome:
CleanShot 2024-10-02 at 10 26 05@2x

FYI the markdown for this toolbar is generated by my plugin, with thanks to your plugin for the icon support!

@chrisgurney chrisgurney changed the title Ability to set an icon's title/tooltip Ability to set an icon's aria-label / tooltip Oct 2, 2024
@FlorianWoelki FlorianWoelki added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants