From f59941d2e42a9fd623a0f9180e9991f9606c7412 Mon Sep 17 00:00:00 2001 From: Joe Clark <31087804+jc-clark@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:03:54 -0700 Subject: [PATCH] Documentation for "Accessible charts" (#51370) Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com> --- .../analyzing-changes-to-a-repositorys-content.md | 13 +++---------- .../viewing-a-projects-contributors.md | 7 +++++-- data/features/accessible-charts.yml | 6 ++++++ .../repositories-insights-graphs-download-steps.md | 2 ++ 4 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 data/features/accessible-charts.yml create mode 100644 data/reusables/repositories/repositories-insights-graphs-download-steps.md diff --git a/content/repositories/viewing-activity-and-data-for-your-repository/analyzing-changes-to-a-repositorys-content.md b/content/repositories/viewing-activity-and-data-for-your-repository/analyzing-changes-to-a-repositorys-content.md index 78b0e2e9b7..e7049a1bfc 100644 --- a/content/repositories/viewing-activity-and-data-for-your-repository/analyzing-changes-to-a-repositorys-content.md +++ b/content/repositories/viewing-activity-and-data-for-your-repository/analyzing-changes-to-a-repositorys-content.md @@ -30,14 +30,11 @@ You can see all commits made to a repository in the past year (excluding merge c The top graph shows commits for the entire year by week. The bottom graph shows the average number of commits by day of the week for the selected week. -![Screenshot of both the repository commit graphs, showing a yearly and then a weekly view.](/assets/images/help/graphs/repo-commit-activity-graphs.png) - ### Accessing the commits graph {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.accessing-repository-graphs %} 1. In the left sidebar, click **Commits**. -![Screenshot of the left sidebar. The "Commits" tab is highlighted with a dark orange outline.](/assets/images/help/graphs/commits-tab.png) ## Visualizing additions and deletion to content in a repository @@ -45,18 +42,14 @@ The top graph shows commits for the entire year by week. The bottom graph shows The code frequency graph displays the content additions and deletions for each week in a repository's history. -{% ifversion fpt or ghec %} - -![Screenshot of the code frequency graph.](/assets/images/help/graphs/repo-code-frequency-graph-dotcom.png) - -{% endif %} - ### Accessing the code frequency graph {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.accessing-repository-graphs %} 1. In the left sidebar, click **Code frequency**. -![Screenshot of the left sidebar. The "Code frequency" tab is highlighted with a dark orange outline.](/assets/images/help/graphs/code-frequency-tab.png) +{%- ifversion accessible-charts %} +{% data reusables.repositories.repositories-insights-graphs-download-steps %} +{% endif %} {% ifversion repository-activity-view %} {% data reusables.repositories.activity-view %} diff --git a/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md b/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md index 591b3f926e..01b31b7a49 100644 --- a/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md +++ b/content/repositories/viewing-activity-and-data-for-your-repository/viewing-a-projects-contributors.md @@ -31,9 +31,12 @@ You can also see a list of people who have contributed to the project's Python d {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.accessing-repository-graphs %} 1. In the left sidebar, click **Contributors**. - ![Screenshot of the "Contributors" tab. The tab is highlighted with a dark orange outline.](/assets/images/help/graphs/contributors-tab.png) +{%- ifversion accessible-charts %} +1. Optionally, to view contributors during a specific time period, to the right of "Contributors," click **Period: All**. Then select a time period. +{% data reusables.repositories.repositories-insights-graphs-download-steps %} +{%- else %} 1. Optionally, to view contributors during a specific time period, click, then drag until the time period is selected. The contributors graph sums weekly commit numbers onto each Sunday, so your time period must include a Sunday. - ![Screenshot of a selection of a specific time period in the contributors graph. The selection is highlighted with a dark orange outline.](/assets/images/help/graphs/repo-contributors-click-drag-graph.png) +{% endif %} ## Troubleshooting contributors diff --git a/data/features/accessible-charts.yml b/data/features/accessible-charts.yml new file mode 100644 index 0000000000..5afa7162f0 --- /dev/null +++ b/data/features/accessible-charts.yml @@ -0,0 +1,6 @@ +# Issue 14969 +# Accessibility updates to the repo insights and the code frequency pages +versions: + fpt: '*' + ghec: '*' + ghes: '>=3.15' diff --git a/data/reusables/repositories/repositories-insights-graphs-download-steps.md b/data/reusables/repositories/repositories-insights-graphs-download-steps.md new file mode 100644 index 0000000000..47b27ef898 --- /dev/null +++ b/data/reusables/repositories/repositories-insights-graphs-download-steps.md @@ -0,0 +1,2 @@ +1. Optionally, to view the graph as a table, in the top-right corner of the graph, click {% octicon "kebab-horizontal" aria-label="Chart options" %}. Then click **View as table**. +1. Optionally, to download a CSV or PNG, in the top-right corner of the graph, click {% octicon "kebab-horizontal" aria-label="Chart options" %}. Then click **Download CSV** or **Download PNG**.