mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Fix a couple accessibility issues with :focus
elements (#3979)
* [bugfix/frontend] Fix accessibility/focus issues in settings + web ui * fix little error * tweaks
This commit is contained in:
@ -65,20 +65,23 @@ export default function HeaderPermsOverview() {
|
||||
} = useGetHeaderAllowsQuery(NoArg, { skip: permType !== "allow" });
|
||||
|
||||
const itemToEntry = (perm: HeaderPermission) => {
|
||||
const onClick = () => {
|
||||
// When clicking on a header perm,
|
||||
// go to the detail view for perm.
|
||||
setLocation(`/${permType}s/${perm.id}`, {
|
||||
// Store the back location in
|
||||
// history so the detail view
|
||||
// can use it to return here.
|
||||
state: { backLocation: location }
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<dl
|
||||
key={perm.id}
|
||||
className="entry pseudolink"
|
||||
onClick={() => {
|
||||
// When clicking on a header perm,
|
||||
// go to the detail view for perm.
|
||||
setLocation(`/${permType}s/${perm.id}`, {
|
||||
// Store the back location in
|
||||
// history so the detail view
|
||||
// can use it to return here.
|
||||
state: { backLocation: location }
|
||||
});
|
||||
}}
|
||||
onClick={onClick}
|
||||
onKeyDown={e => e.key === "Enter" && onClick()}
|
||||
role="link"
|
||||
tabIndex={0}
|
||||
>
|
||||
|
Reference in New Issue
Block a user