-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Alt text for documentation #5226
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @batpigandme can I get you to look quickly through this and confirm that this format is the right one for alt text when it comes to helping out readers with vision impairment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much. These are fantastic—you've done a really great job of highlighting the aspect of each plot that's relevant to the context. My edits are minor (I'd say 75% of them are just me hyphenating compound modifiers).
@@ -265,6 +319,11 @@ The [**scales**](https://scales.r-lib.org/) package offers a large number of fun | |||
Use `scales::label_number()` to force decimal display of numbers rather than using scientific notation or use `scales::label_comma()` to insert a comma every three digits. | |||
|
|||
```{r} | |||
#| fig.alt = "A scatter plot showing the median sale price of housing in Texas | |||
#| on the x-axis and the total volume of sales on the y-axis. The labels of | |||
#| the y-axis are written out in full, with commas marking groups of three |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#| the y-axis are written out in full, with commas marking groups of three | |
#| the y-axis labels are written out in full, with commas marking groups of three |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The labels are mentioned in the line above, so I think we're safe for now :)
Co-authored-by: Mara Averick <[email protected]>
Thanks for the thorough review, helpful suggestions and kind words @batpigandme! I apologise for the spelling mistake that got copied over a few times. With the exception of the change 'The labels of the y-axis are written out in full' --> 'The labels of the y-axis labels are written out in full', I've accepted all the suggestions. |
This PR aims to fix #5222.
Briefly it adds alt text to plots in the readme, vignettes and articles. I tried to structure alt text for plots in the following way:
Because the docs are structured a lot along the lines 'here is a basic plot that we'll modify in various ways', a lot of repetition occurs in describing what is being plotted. I don't know if this repetition is preferred or not by the target audience of alt text. Instead of this repetition, one could alternatively describe 'as the previous plot, but with the following changes'.