Skip to content

Commit 02ee9cd

Browse files
committed
fix: accessibility - increase contrast of arrows
* changed behaviour, now only one arrow shows when sorting state because increasing contrast made it difficult to distinguish between dark gray and black
1 parent 40d455f commit 02ee9cd

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/frontend/scss/grid.scss

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,19 @@
8181
.icon-asc {
8282
position: absolute;
8383
font-size: 12px;
84-
color: lightgray;
84+
color: #474747;
8585
padding-left: 10px;
8686
background-color: #f8f8f8;
8787
}
8888

8989
.icon-desc {
90-
position: absolute;
9190
right: 0px;
9291
bottom: -2px;
93-
font-size: 12px;
94-
color: lightgray;
95-
padding-left: 10px;
96-
background-color: #f8f8f8;
9792
}
9893

9994
.icon-asc {
100-
position: absolute;
10195
right: 0px;
10296
top: -1px;
103-
font-size: 12px;
104-
color: lightgray;
105-
padding-left: 10px;
106-
background-color: #f8f8f8;
10797
}
10898

10999
&:hover {

src/frontend/view/customAgGridHeader.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,20 @@ export default class CustomAgGridHeader {
124124
this.sortModel[this.colId].sortIndex + 1
125125
}</div>`
126126
}
127-
html = `${html}
128-
<span class="icon-desc" aria-hidden="true">▼</span>
129-
<span class="icon-asc" aria-hidden="true">▲</span>
130-
`
127+
if (this.sortingState === SortAction.NONE) {
128+
html += `
129+
<span class="icon-desc" aria-hidden="true">▼</span>
130+
<span class="icon-asc" aria-hidden="true">▲</span>`
131+
} else if (this.sortingState === SortAction.ASC) {
132+
html += `
133+
<span class="icon-asc" aria-hidden="true">▲</span>
134+
`
135+
} else if (this.sortingState === SortAction.DESC) {
136+
html += `
137+
<span class="icon-desc" aria-hidden="true">▼</span>
138+
`
139+
}
140+
131141
return html
132142
}
133143

0 commit comments

Comments
 (0)