[bugfix/frontend] Fix accessibility/focus issues in settings + web ui

This commit is contained in:
tobi 2025-04-09 12:56:04 +02:00
commit bfee7041c0
23 changed files with 380 additions and 152 deletions

View file

@ -211,21 +211,24 @@ function DraftListEntry({ permDraft, linkTo, backLocation }: DraftEntryProps) {
const title = `${permTypeUpper} ${domain}`;
const onClick = () => {
// When clicking on a draft, direct
// to the detail view for that draft.
setLocation(linkTo, {
// Store the back location in history so
// the detail view can use it to return to
// this page (including query parameters).
state: { backLocation: backLocation }
});
};
return (
<span
className={`pseudolink domain-permission-draft entry ${permType}`}
aria-label={title}
title={title}
onClick={() => {
// When clicking on a draft, direct
// to the detail view for that draft.
setLocation(linkTo, {
// Store the back location in history so
// the detail view can use it to return to
// this page (including query parameters).
state: { backLocation: backLocation }
});
}}
onClick={onClick}
onKeyDown={e => e.key === "Enter" && onClick()}
role="link"
tabIndex={0}
>