fix(editor): keep the drawing still when the selection changes
The « Sélection : … » tag above the drawing mounted on select and unmounted on deselect, moving the canvas. It is now sr-only text, not live, in both twins; board 04 deviation recorded (owner 2026-11-12).
This commit is contained in:
1 parent
9f092ec1e2
commit
927537b343
6 files changed
+91
-8
No files matched your search
@@ -1,10 +1,11 @@
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
const TAG =
|
||||
'pointer-events-none inline-block rounded-md px-2 py-1 text-xs ' +
|
||||
'bg-[var(--color-surface-strong)]'
|
||||
|
||||
/** Board 04's tag over the drawing: « Sélection : <type> « <nom> ». */
|
||||
/**
|
||||
* « Sélection : <type> « <nom> » for screen readers only. Out of the visual
|
||||
* flow (sr-only is absolute): showing it shifted the drawing at each
|
||||
* selection change (owner 2026-11-12). Sighted users read the highlight and
|
||||
* the properties panel; not a live region, so nothing is announced twice.
|
||||
*/
|
||||
export default function SelectionTag({
|
||||
kind,
|
||||
name,
|
||||
@@ -14,7 +15,7 @@ export default function SelectionTag({
|
||||
}) {
|
||||
const t = useT()
|
||||
return (
|
||||
<p data-testid="annotation-selection-tag" className={TAG}>
|
||||
<p data-testid="annotation-selection-tag" className="sr-only">
|
||||
{t('editor.annotations.selection')
|
||||
.replace(
|
||||
'{kind}',
|
||||
|
||||
Reference in new issue
Block a user