co-analysis/a11ytables

Allow inclusion of images/graphs

fingertipsy opened this issue · 1 comments

would it be possible to have sheet_type = image or sheet_type = graph and pass .svg images or ggobjects to be displayed on the worksheet?

Hi, thanks for the question.

You may be aware that this package is built to support the 'Releasing statistics in spreadsheets' guidance by the Government Analysis Function. Regarding images, the guidance says:

Images within spreadsheets should be avoided. Generally the best place for any analysis or data visualisations is in HTML.

Similarly, the 'Accessible spreadsheets: a checklist of the basics' page says:

11. Avoid images in spreadsheets
Images should be avoided as they can disrupt navigation. If you cannot avoid including images, make sure all logos, graphics, charts and any other images within the spreadsheet document have alternative text attached to them.

For these reasons, {a11ytables} currently doesn't support image insertion.

You could, however, insert a new sheet to the Workbook-class object generated by a11ytables::generate_workbook() and use the openxlsx::insertImage() function to insert an image.