[Glitch] Manage focus on navigation
Port bcb8553e01 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
5893554a3a
commit
4cb1bf73c9
21 files changed
+254
-33
No files matched your search
+8
-1
@@ -2,6 +2,7 @@ import { useCallback } from 'react';
|
||||
|
||||
import { FormattedMessage, defineMessages } from 'react-intl';
|
||||
|
||||
import { NavigationFocusTarget } from '@/flavours/glitch/components/navigation_focus_target';
|
||||
import { Button } from 'flavours/glitch/components/button';
|
||||
import {
|
||||
ModalShell,
|
||||
@@ -75,7 +76,13 @@ export const ConfirmationModal: React.FC<
|
||||
return (
|
||||
<ModalShell onSubmit={handleClick}>
|
||||
<ModalShellBody className={className}>
|
||||
<h1 id={titleId}>{title}</h1>
|
||||
{noFocusButton ? (
|
||||
<NavigationFocusTarget as='h1' id={titleId}>
|
||||
{title}
|
||||
</NavigationFocusTarget>
|
||||
) : (
|
||||
<h1>{title}</h1>
|
||||
)}
|
||||
{message && <p>{message}</p>}
|
||||
|
||||
{extraContent ?? children}
|
||||
|
||||
Reference in new issue
Block a user