@samitouri / QOSami-HFS / commits / 1828265a

a11y: admin/fs: link-button to change folder-content permission could not be focused

Massimo Melina committed Jan 21, 2024 at 15:31 UTC 1828265ac16a0c6dfb012b4e0a29d65f182421fd
1 file changed +10 -1
admin/src/mui.ts
+10 -1
@@ -212,7 +212,16 @@ export const Center = forwardRef((props: BoxProps, ref) =>
212 h(Box, { ref, display:'flex', height:'100%', width:'100%', justifyContent:'center', alignItems:'center', flexDirection: 'column', ...props }))
213
214 export function LinkBtn({ ...rest }: LinkProps) {
215 - return h(Link, { ...rest, sx: { cursor: 'pointer', ...rest.sx } })
215 + return h(Link, {
216 + ...rest,
217 + href: '',
218 + sx: { cursor: 'pointer', ...rest.sx },
219 + role: 'button',
220 + onClick(ev) {
221 + ev.preventDefault()
222 + rest.onClick?.(ev)
223 + }
224 + })
225 }
226
227 export function usePauseButton() {