Skip to content

Commit

Permalink
Add accessible name to 'Edit this page' icon (#411)
Browse files Browse the repository at this point in the history
Co-authored-by: Pradyun Gedam <[email protected]>
  • Loading branch information
hugovk and pradyunsg authored Apr 4, 2022
1 parent 94783af commit aa04cd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.6.1
rev: v2.6.2
hooks:
- id: prettier
exclude: src/furo/theme/.*|docs/(recommendations|reference/admonitions).md

- repo: https://github.com/psf/black
rev: 22.1.0
rev: 22.3.0
hooks:
- id: black
language_version: python3.8
Expand Down
5 changes: 3 additions & 2 deletions src/furo/theme/furo/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@
{#- Edit this page, on GitHub -#}
{%- if READTHEDOCS and conf_py_path and page_source_suffix and github_user != "None" and github_repo != "None" and github_version %}
<div class="edit-this-page">
<a class="muted-link" href="https://github.com/{{ github_user }}/{{ github_repo }}/edit/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}">
<svg viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<a class="muted-link" href="https://github.com/{{ github_user }}/{{ github_repo }}/edit/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" title="{{ _("Edit this page") }}">
<svg aria-hidden="true" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4" />
<line x1="13.5" y1="6.5" x2="17.5" y2="10.5" />
</svg>
<span class="visually-hidden">{{ _("Edit this page") }}</span>
</a>
</div>
{% endif %}
Expand Down

0 comments on commit aa04cd6

Please sign in to comment.