mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-10 08:08:48 +08:00
fix(a11y): wrap sort column headers in button elements
Table sort triggers were bare th elements, which are not keyboard focusable or announced as interactive by screen readers. Replace with button elements inside th so keyboard users can activate sorting and get proper focus-visible ring. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -624,16 +624,25 @@ kbd {
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
th[data-sort] {
|
||||
.sort-btn {
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: color 180ms ease;
|
||||
}
|
||||
|
||||
th[data-sort]:hover {
|
||||
.sort-btn:hover {
|
||||
color: var(--accent-deep);
|
||||
}
|
||||
|
||||
.sort-btn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
th[data-sort]::after {
|
||||
content: " \2193";
|
||||
opacity: 0;
|
||||
|
||||
Reference in New Issue
Block a user