1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Resolves #9250: Make settings tabs focusable by keyboard (#9253)

This commit is contained in:
Henry Heino 2023-11-10 06:00:59 -08:00 committed by GitHub
parent 041ad22443
commit f3daa7f0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,15 @@ export default function Sidebar(props: Props) {
function renderButton(section: any) {
const selected = props.selection === section.name;
return (
<StyledListItem key={section.name} isSubSection={Setting.isSubSection(section.name)} selected={selected} onClick={() => { props.onSelectionChange({ section: section }); }}>
<StyledListItem
key={section.name}
href='#'
aria-role='tab'
aria-selected={selected}
isSubSection={Setting.isSubSection(section.name)}
selected={selected}
onClick={() => { props.onSelectionChange({ section: section }); }}
>
<StyledListItemIcon
className={Setting.sectionNameToIcon(section.name, AppType.Desktop)}
/>
@ -123,7 +131,7 @@ export default function Sidebar(props: Props) {
}
return (
<StyledRoot>
<StyledRoot aria-role='tablist'>
{buttons}
</StyledRoot>
);