Skip to content

Commit 3bf74ad

Browse files
Fix : web accessibility. (#202)
* Add the web assibility * accessibility for datatable * Add the codecell accessibility * Pre-commit update
1 parent 683ac46 commit 3bf74ad

File tree

2 files changed

+40
-22
lines changed

2 files changed

+40
-22
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 22.10.0
3+
rev: 23.1.0
44
hooks:
55
- id: black
66

@@ -10,7 +10,7 @@ repos:
1010
- id: isort
1111

1212
- repo: https://github.com/PyCQA/flake8
13-
rev: 5.0.4
13+
rev: 6.0.0
1414
hooks:
1515
- id: flake8
1616

@@ -20,20 +20,20 @@ repos:
2020
- id: codespell
2121

2222
- repo: https://github.com/pycqa/pydocstyle
23-
rev: 6.1.1
23+
rev: 6.3.0
2424
hooks:
2525
- id: pydocstyle
2626
additional_dependencies: [toml]
2727

2828
- repo: https://github.com/pre-commit/pre-commit-hooks
29-
rev: v4.3.0
29+
rev: v4.4.0
3030
hooks:
3131
- id: check-merge-conflict
3232
- id: debug-statements
3333
- id: requirements-txt-fixer
3434

3535
# this validates our github workflow files
3636
- repo: https://github.com/python-jsonschema/check-jsonschema
37-
rev: 0.19.1
37+
rev: 0.21.0
3838
hooks:
3939
- id: check-github-workflows

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ html[data-theme="light"] {
9494
--pst-color-codecell: #fafae2;
9595
--pst-color-codeout: var(--pst-color-inline-code);
9696
--pst-color-sig: #0965C8;
97+
--pst-color-code-s1: #b35000;
98+
--pst-color-code-c1: #095D0A;
9799
/*****************************************************************************
98100
* sphinx design primary color
99101
*/
@@ -144,6 +146,8 @@ html[data-theme="dark"] {
144146
--pst-color-codecell: #495057;
145147
--pst-color-codeout: #f2f4f6;
146148
--pst-color-sig:#d6ab1e;
149+
--pst-color-code-s1: #D79A60;
150+
--pst-color-code-c1: #8FB842;
147151

148152
/*****************************************************************************
149153
* table hovering
@@ -172,7 +176,7 @@ Codecell
172176
*/
173177

174178
dt:target, span.highlighted {
175-
background-color: var(--pst-color-border)!important;
179+
background-color: var(--pst-color-codecell)!important;
176180
}
177181

178182
.docutils {
@@ -396,6 +400,32 @@ DataFrame-centered
396400
text-align: center;
397401
}
398402

403+
/*
404+
############
405+
data table
406+
############
407+
*/
408+
409+
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
410+
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
411+
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
412+
color: var(--pst-color-text-base)!important;
413+
}
414+
415+
.dataTables_wrapper, .dataTables_wrapper .dataTables_filter,
416+
.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing,
417+
.dataTables_wrapper .dataTables_paginate {
418+
color: var(--pst-color-text-base)!important;
419+
}
420+
421+
table.dataTable tbody th, table.dataTable tbody td {
422+
background: var(--pst-color-background);
423+
}
424+
425+
label {
426+
color: var(--pst-color-text-base);
427+
}
428+
399429
/*
400430
##########
401431
Scroll-bar
@@ -485,29 +515,17 @@ Sphinx gallery output
485515
font-size: 1.1em;
486516
}
487517

488-
html[data-theme="light"] .highlight .s1, .kc {
489-
color: #753E0B !important;
490-
}
491-
492-
html[data-theme="dark"] .highlight .s1, .s2, .kc {
493-
color: #D79A60 !important;
518+
.highlight .s1, .s2, .kc {
519+
color: var(--pst-color-code-s1)!important;
494520
}
495521

496522
html[data-theme="dark"] .highlight .kn {
497523
color: #E18FFF;
498524
font-weight: normal;
499525
}
500526

501-
html[data-theme="light"] .highlight .c1 {
502-
color: #095D0A;
503-
}
504-
505-
html[data-theme="dark"] .highlight .c1 {
506-
color: #8FB842;
507-
}
508-
509-
html[data-theme="light"] .highlight .s2 {
510-
color: #753E0B !important;
527+
.highlight .c1 {
528+
color: var(--pst-color-code-c1);
511529
}
512530

513531
html[data-theme="dark"] .highlight .n {

0 commit comments

Comments
 (0)