You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new_a11ytable() captures all the information required to make the contents page without the need for the user to create it themselves. It's just tab_title and sheet_title from the a11ytables-class object in a table format.
Would users want to add anything more to the contents table? Might be beneficial to be restrictive and stop this (better consistency, fewer inputs for end user, less chance for contents/tabs mismatch errors as per #34). They can always add things after the a11ytable has been created.
So for this demo dataset:
> mtcars_df
# # A tibble: 4 × 6
# tab_title sheet_type sheet_title source table_name table
# <chr> <chr> <chr> <chr> <chr> <list>
# 1 Cover cover The mtcars demo datset: 'Motor Trend Car Road Tests' NA cover_sheet <df [2 × 2]>
# 2 Contents contents Table of contents NA table_of_contents <df [2 × 2]>
# 3 Notes notes Notes NA notes_table <df [6 × 2]>
# 4 Table 1 tables Motor Trend Car Road Tests Motor Trend (1974) car_scores <df [32 × 6]>
You can grab the tab and sheet titles and put them in a data.frame:
I think it might be conceptually weird for the user not to provide the contents table, since they'll be providing a table for all the other sheets. I think this provides maximum flexibility for the user as well, who might want to add more colums into the contents table for whatever reason and they should be able to do it at the step where they add the table, rather than having to create the a11ytable and then amend it afterwards.
Better: generate the notes sheet on behalf of the user if they do not provide the information to create one. This would maintain backwards compatibility too.
matt-dray
changed the title
Autogenerate contents table?
Autogenerate contents table if user doesn't supply one
Dec 27, 2023
new_a11ytable()
captures all the information required to make the contents page without the need for the user to create it themselves. It's justtab_title
andsheet_title
from the a11ytables-class object in a table format.Would users want to add anything more to the contents table? Might be beneficial to be restrictive and stop this (better consistency, fewer inputs for end user, less chance for contents/tabs mismatch errors as per #34). They can always add things after the a11ytable has been created.
So for this demo dataset:
You can grab the tab and sheet titles and put them in a data.frame:
Or whatever.
The text was updated successfully, but these errors were encountered: