fix(client): preserve explicit dialog focus and verify accessible controls

Keep the focused search for new places and title fields in explicitly opened dialogs. Assert the native ride badge button and the pointer grip tooltip in the existing tests.
This commit is contained in:
Maurice
2026-12-01 21:13:35 +01:00
parent e539860530
commit 756ef14b97
4 changed files with 6 additions and 5 deletions
@@ -12,6 +12,7 @@ import { PendingFiles, PlaceImageSection } from './PlaceFormMedia'
import { usePlaceImageField } from './usePlaceImageField'
import { useToast } from '../shared/Toast'
import { Tooltip } from '../shared/Tooltip'
import { focusRevealedEditor } from '../shared/dialogFocus'
import { Search, RotateCcw, LocateFixed, PencilLine } from 'lucide-react'
import { useTranslation } from '../../i18n'
import { PlaceContactFields } from './PlaceContactFields'
@@ -644,7 +645,7 @@ export default function PlaceFormModal(props: PlaceFormModalProps) {
type="text"
// A new place starts at the search; an edit or a place brought
// in from the map already has what the search would give.
data-initial-focus={(!place && !prefillCoords) || undefined}
ref={!place && !prefillCoords ? focusRevealedEditor : undefined}
value={mapsSearch}
onChange={e => { setMapsSearch(e.target.value); S.setEmptySearch(null) }}
onKeyDown={handleSearchKeyDown}