Skip to content

[Accessibility] closing #926 - #988

Merged
rich-iannone merged 55 commits into
rstudio:masterfrom
jooyoungseo:jooyoungseo/issue926
Sep 8, 2022
Merged

rich-iannone merged 55 commits into
rstudio:masterfrom
jooyoungseo:jooyoungseo/issue926

Conversation

@jooyoungseo

@jooyoungseo jooyoungseo commented Jul 14, 2022 •

Copy link
Copy Markdown
Collaborator
  • Replaced <td> with <th> for summary_rows and group_rows.
  • Assigned id attribute to each of the table headers denoted with <th>.
  • Assign headers attribute to regular table cells denoted with <td> to semantically be associated with corresponding headers.

Fixes: #926

@jooyoungseo

Copy link
Copy Markdown
Collaborator Author

@rich-iannone -- Still row_id does not change its value. Why do we need a new variable, col_id? Isn't it the same as as.character(x)?

@jooyoungseo

jooyoungseo commented Jul 30, 2022 •

Copy link
Copy Markdown
Collaborator Author

@rich-iannone -- Test with the following code after installing this PR:

Reprex

library(tidyverse)
library(gt)

# Create a gt table using the `exibble` dataset
exibble_a <-
    exibble %>%
    select(-c(fctr, date, time, datetime)) %>%
    gt(rowname_col = "row", groupname_col = "group") %>%
    sub_missing()



# Create groupwise summary rows for both
# groups (using `groups = TRUE`); use the
# `mean()`, `sum()`, and `sd()` functions
# (only for the `num` column)
exibble_b <-
    exibble_a %>%
    summary_rows(
        groups = TRUE,
        columns = num,
        fns = list(
            average = "mean",
            total = "sum",
            SD = "sd"
        )
    )

exibble_b

@jooyoungseo
jooyoungseo marked this pull request as ready for review September 8, 2022 18:45
@rich-iannone
rich-iannone self-requested a review September 8, 2022 23:06

@rich-iannone rich-iannone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

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.

[accessibility] Assign ids to summary row heads (<th>) and apply as headers to <td>s

2 participants