@@ -46,7 +46,7 @@ export default function AccountListSidebar({
46
46
} : Props ) {
47
47
const tx = useTranslationFunction ( )
48
48
49
- const accountsListRef = useRef < HTMLDivElement > ( null )
49
+ const accountsListRef = useRef < HTMLUListElement > ( null )
50
50
const { openDialog } = useDialog ( )
51
51
const [ accounts , setAccounts ] = useState < number [ ] > ( [ ] )
52
52
const [ { accounts : noficationSettings } ] = useAccountNotificationStore ( )
@@ -144,27 +144,35 @@ export default function AccountListSidebar({
144
144
data-tauri-drag-region
145
145
/>
146
146
) }
147
- < div
147
+ < ul
148
148
ref = { accountsListRef }
149
+ // Perhaps just "Profiles" would be more appropriate,
150
+ // because you can do other things with profiles in this list,
151
+ // but we have the same on Android.
152
+ aria-label = { tx ( 'switch_account' ) }
149
153
className = { styles . accountList }
150
154
onScroll = { updateHoverInfoPosition }
151
155
>
152
156
< RovingTabindexProvider wrapperElementRef = { accountsListRef } >
153
157
{ accounts . map ( id => (
154
- < AccountItem
155
- key = { id }
156
- accountId = { id }
157
- isSelected = { selectedAccountId === id }
158
- onSelectAccount = { selectAccount }
159
- openAccountDeletionScreen = { openAccountDeletionScreen }
160
- updateAccountForHoverInfo = { updateAccountForHoverInfo }
161
- syncAllAccounts = { syncAllAccounts }
162
- muted = { noficationSettings [ id ] ?. muted || false }
163
- />
158
+ < li >
159
+ < AccountItem
160
+ key = { id }
161
+ accountId = { id }
162
+ isSelected = { selectedAccountId === id }
163
+ onSelectAccount = { selectAccount }
164
+ openAccountDeletionScreen = { openAccountDeletionScreen }
165
+ updateAccountForHoverInfo = { updateAccountForHoverInfo }
166
+ syncAllAccounts = { syncAllAccounts }
167
+ muted = { noficationSettings [ id ] ?. muted || false }
168
+ />
169
+ </ li >
164
170
) ) }
165
- < AddAccountButton onClick = { onAddAccount } />
171
+ < li >
172
+ < AddAccountButton onClick = { onAddAccount } />
173
+ </ li >
166
174
</ RovingTabindexProvider >
167
- </ div >
175
+ </ ul >
168
176
{ /* The condition is the same as in https://github.com/deltachat/deltachat-desktop/blob/63af023437ff1828a27de2da37bf94ab180ec528/src/renderer/contexts/KeybindingsContext.tsx#L26 */ }
169
177
{ window . __screen === Screens . Main && (
170
178
< div className = { styles . buttonsContainer } >
0 commit comments