Skip to content

Commit 48e66b7

Browse files
authored
Merge pull request #326 from acharraggi/fix-links
adjust links to improve accessibility
2 parents 0201d90 + d3af20e commit 48e66b7

File tree

5 files changed

+92
-31
lines changed

5 files changed

+92
-31
lines changed

docs/source/_static/css/ftc-rtd.css

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,70 @@ div.ethical-sidebar, div.ethical-footer {
145145
.sphinx-tab img {
146146
margin-bottom: 24px;
147147
}
148+
149+
/* fix link text in body content for accessibility
150+
exclude .sd-btn which are the buttons on the persona pages*/
151+
.document a:not(.sd-btn) {
152+
color: #0000EE;
153+
text-decoration-line: underline;
154+
text-decoration-style: solid;
155+
text-decoration-color: #0000EE;
156+
text-underline-offset: 0.2em;
157+
}
158+
.document a:not(.sd-btn):visited {
159+
color: #551A8B;
160+
text-decoration-style: dotted; /* many browsers don't support decorations on visited link */
161+
text-decoration-color: #551A8B;
162+
}
163+
.document a:not(.sd-btn):focus {
164+
outline: 1px solid #0000EE;;
165+
}
166+
.document a:not(.sd-btn):hover {
167+
text-decoration-thickness: 0.2em;
168+
text-underline-offset: 0.25em;
169+
}
170+
.document a:not(.sd-btn):active {
171+
text-decoration-style: wavy;
172+
}
173+
/* handle dark mode links */
174+
html[data-theme='dark'] .document a:not(.sd-btn) {
175+
color: #249ee8;
176+
text-decoration-line: underline;
177+
text-decoration-style: solid;
178+
text-decoration-color: #249ee8;
179+
text-underline-offset: 0.2em;
180+
}
181+
html[data-theme='dark'] .document a:not(.sd-btn):visited {
182+
color: #bb7feF;
183+
text-decoration-style: dotted;
184+
text-decoration-color: #bb7feF;
185+
}
186+
html[data-theme='dark'] .document a:not(.sd-btn):focus {
187+
outline: 1px solid #249ee8;
188+
}
189+
html[data-theme='dark'] .document a:not(.sd-btn):hover {
190+
text-decoration-thickness: 0.2em;
191+
text-underline-offset: 0.25em;
192+
}
193+
html[data-theme='dark'] .document a:not(.sd-btn):active {
194+
text-decoration-style: wavy;
195+
}
196+
/* Screen Reader - No Select class */
197+
.sr-only-no-select {
198+
user-select: none;
199+
-webkit-user-select: none;
200+
position: absolute;
201+
width: 1px;
202+
height: 1px;
203+
margin: -1px;
204+
padding: 0;
205+
overflow: hidden;
206+
clip: rect(0, 0, 0, 0);
207+
border: 0;
208+
}
209+
.icon-external-link:before { /* This is the fa-external-link icon */
210+
font-family: FontAwesome;
211+
content: "\f08e";
212+
margin-left: .2em;
213+
text-decoration-line: none;
214+
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
$(document).ready(function () {
2-
$('a.external').attr('target', '_blank');
3-
$('a.external').attr('rel', 'noopener');
2+
$('a.external').each(function( index, elem ) {
3+
var str = $(elem).html();
4+
$(elem).html(str + '<i class="icon icon-external-link" aria-hidden="true"></i><span class="sr-only-no-select">&nbsp;(external link opens in a new tab)&nbsp;</span>');
5+
$(elem).attr('target', '_blank');
6+
$(elem).attr('rel', 'noopener');
7+
});
48
});

docs/source/_templates/footer.html

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@
2323
{%- if hasdoc('copyright') %}
2424
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
2525
{%- else %}
26-
&#169; 2023 <i>{%- trans copyright=copyright|e %}{{ copyright }}{% endtrans %}</i>
26+
&#169; 2025 <i>{%- trans copyright=copyright|e %}{{ copyright }}{% endtrans %}</i>
2727
{%- endif %}
2828
{%- endif %}
2929
</div>
3030

3131
<div>
32-
<a href="https://www.firstinspires.org/about/privacy-policy">Privacy Policy</a>
32+
<p><a href="{{ pathto('tos/tos') }}">Terms of Service</a></p>
3333
</div>
3434
<div>
35-
<a href="{{ pathto('tos/tos') }}">Terms of Service</a>
35+
<p><a class="external" href="https://www.firstinspires.org/about/privacy-policy">Privacy Policy</a></p>
3636
</div>
3737
<div>
38-
<a href="https://www.firstinspires.org/report">Report an Incident</a>
38+
<p><a href="https://www.firstinspires.org/report">Report an Incident</a></p>
3939
</div>
4040

4141
<div>
@@ -67,19 +67,9 @@
6767
</figure>
6868
</div>
6969
</div>
70-
70+
<!--
7171
<div>
72-
{% if show_sphinx %}
73-
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
74-
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
75-
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
76-
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
77-
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
78-
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
79-
{#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
80-
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
81-
{% endif %}
82-
8372
{%- block extrafooter %} {% endblock %}
8473
</div>
74+
-->
8575
</footer>

docs/source/game_specific_resources/playing_field_resources/playing_field_resources.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Playing Field Resources
22
=======================
33

44
.. figure:: images/CenterStageField.png
5-
:alt: Arena with four teams in alliances areas. Four robots are on the field along with CENTERSTAGE game elements.
5+
:alt: Arena with four teams in alliance areas. Four robots are on the field along with CENTERSTAGE game elements.
66

77
Traditional Playing Field, CENTERSTAGE presented by RTX, 2023-2024
88

@@ -35,17 +35,17 @@ The guide typically has the following sections:
3535
- Most games have AprilTags placed around the field that can be used for robot navigation.
3636
- Finally, there are teardown instructions that indicate how to take the field down for storage or transport.
3737

38-
Use the following button link to download a PDF of the Field Setup Guide from the *FIRST* Website:
38+
Use the following button link to download a PDF of the current Field Setup Guide from the *FIRST* Website:
3939

4040
.. button-link:: https://ftc-resources.firstinspires.org/file/ftc/game/fieldguide
4141
:color: primary
4242

43-
Download PDF, 4.5 MB, will open in a new tab
43+
Download Field Setup Guide PDF, 4.5 MB
4444

4545
.. note:: The Field Setup Guide has instructions for assembling an official game set as purchased from AndyMark.
4646

4747
A purchased game set can be full or partial. A partial game set is less expensive and also suitable for teams who
4848
want official game elements but don't have room to setup a full field.
4949

50-
The `Game and Season Materials page (FIRST website) <https://ftc-resources.firstinspires.org/files/ftc/game>`_ also contains downloadable PDFs for the AprilTag images that can be printed and placed on the field.
51-
There is also a do it yourself (DIY) Resources section that include CAD models of the game and scoring elements and DIY field and perimeter build guides.
50+
The `Game and Season Materials page <https://ftc-resources.firstinspires.org/files/ftc/game>`_ also contains a downloadable PDF for the AprilTag images that can be printed and placed on the field.
51+
There is a Do It Yourself (DIY) Resources section that includes CAD models of scoring elements and DIY field and perimeter build guides.

docs/source/index.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ and :doc:`gracious_professionalism/gp` to see why.
126126
127127
**I am a...**
128128

129-
- :doc:`New Team <persona_pages/rookie_teams/rookie_teams>` - New Teams may not know where to start. This is the way!
129+
- :doc:`New Team <persona_pages/rookie_teams/rookie_teams>` New Teams may not know where to start. This is the way!
130130

131-
- :doc:`Returning Team <persona_pages/veteran_teams/veteran_teams>` - Returning Teams looking for resources can look here.
131+
- :doc:`Returning Team <persona_pages/veteran_teams/veteran_teams>` Returning Teams looking for resources can look here.
132132

133-
- :doc:`Coach <persona_pages/coach_admin/coach_admin>` - Coaches looking for help or Team Administrative Resources can look here.
133+
- :doc:`Coach <persona_pages/coach_admin/coach_admin>` Coaches looking for help or Team Administrative Resources can look here.
134134

135-
- :doc:`Mentor <persona_pages/mentor_tech/mentor_tech>` - Technical Mentors looking for Technical Resources should look here first!
135+
- :doc:`Mentor <persona_pages/mentor_tech/mentor_tech>` Technical Mentors looking for Technical Resources should look here first!
136136

137137
The main menu contains links to the top level content. The following are quick links organized by topic.
138138

@@ -290,7 +290,7 @@ The main menu contains links to the top level content. The following are quick l
290290
:outline:
291291
:expand:
292292

293-
SDK GitHub Repository (external)
293+
SDK GitHub Repository
294294

295295
.. div:: col-sm pl-1 pr-1
296296

@@ -299,7 +299,7 @@ The main menu contains links to the top level content. The following are quick l
299299
:outline:
300300
:expand:
301301

302-
SDK Releases (external)
302+
SDK Releases
303303

304304
.. div:: col-sm pl-1 pr-1
305305

@@ -308,7 +308,7 @@ The main menu contains links to the top level content. The following are quick l
308308
:outline:
309309
:expand:
310310

311-
Javadoc Documentation (external)
311+
Javadoc Documentation
312312

313313
.. grid-item-card::
314314
:class-header: sd-bg-secondary font-weight-bold sd-text-black
@@ -350,7 +350,7 @@ The main menu contains links to the top level content. The following are quick l
350350
:outline:
351351
:expand:
352352

353-
Game Question and Answer System (external)
353+
Game Question and Answer System
354354

355355
.. note::
356356

0 commit comments

Comments
 (0)