Skip to content

add skill to find and improve alt text for pkgdown documentation#47

Merged
gadenbuie merged 8 commits intoposit-dev:mainfrom
EmilHvitfeldt:pkgdown-alt-text
Apr 28, 2026
Merged

add skill to find and improve alt text for pkgdown documentation#47
gadenbuie merged 8 commits intoposit-dev:mainfrom
EmilHvitfeldt:pkgdown-alt-text

Conversation

@EmilHvitfeldt
Copy link
Copy Markdown
Contributor

@EmilHvitfeldt EmilHvitfeldt commented Apr 15, 2026

Pretty much what the title says.

It is very similarly scoped to the quarto-alt-text skill. It is instructed to read nearby text for context, and follow the same rules. the difference is how it finds the images and where to place the alt text

Evaluation

File Lines ~Tokens
SKILL.md 207 1,744
Description - 76

Copy link
Copy Markdown
Collaborator

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks great. My biggest comment is around considering merging this skill with the quarto alt text skill, which I think would be a good idea.

Comment thread r-lib/pkgdown-alt-text/SKILL.md Outdated
Comment thread r-lib/pkgdown-alt-text/SKILL.md Outdated

```r
# Build only articles (faster than full site)
Rscript -e "pkgdown::build_articles()"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised this wasn't picked up by pkgdown::check_pkgdown() or pkgdown::pkgdown_sitrep(). Might be worth opening an issue in pkgdown to see if there could be a faster path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an PR for this here: r-lib/pkgdown#2985

Comment thread r-lib/pkgdown-alt-text/SKILL.md Outdated
@EmilHvitfeldt
Copy link
Copy Markdown
Contributor Author

Okay, did a bunch.

Now there is a new skill alt-text that dispatches to either pkgdown or quarto specific instructions, while keeping the alt-text specific information in the main skill

I also added a PR to pkgdown r-lib/pkgdown#2985, to have it give better feedback on missing alt-text. however since that is not merged or on CRAN yet I have left the instructions to grep through instead

@EmilHvitfeldt EmilHvitfeldt requested a review from gadenbuie April 23, 2026 18:31
Comment thread quarto/quarto-alt-text/SKILL.md Outdated
Quarto documents and pkgdown sites.

Generate accessible alt text for data visualizations in this project.
If you have the `quarto` plugin installed, reinstall it to get the updated skill:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong, but I think we should just move the skill. I don't think there's a good migration story for skills/plugins/etc. Or at least, we've moved skills around before and haven't heard much yelling.

OTOH if you have a clear vision for how this works and is better than just moving the skill, let me know :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. I didn't have any major plans, so i just moved the skill now

Comment thread r-lib/README.md Outdated
Comment thread alt-text/SKILL.md
name: alt-text
description: >
Generate and improve accessible alt text for data visualizations and images
in R packages and Quarto documents. Use when the user wants to add, improve,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to have a similar skill for Shiny apps, too. If you wanted to add that, I'd be grateful. Or I'd be happy to just open an issue and come back to it when I have a minute.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about shiny to write a good skill for that :)

Copy link
Copy Markdown
Collaborator

@gadenbuie gadenbuie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @EmilHvitfeldt!

@gadenbuie gadenbuie merged commit 030f607 into posit-dev:main Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants