[Accessibility] Manage focus on navigation (#39350)

This commit is contained in:
diondiondion authored and GitHub committed 2026-06-10 12:34:48 +00:00
1 parent bff9f0eb6d
commit bcb8553e01
22 files changed
+265 -37

No files matched your search

@@ -33,6 +33,7 @@ import StatusContent from './status_content';
import { StatusThreadLabel } from './status_thread_label';
import { CollectionPreviewCard } from '../features/collections/components/collection_preview_card';
import { compareUrls } from '../utils/compare_urls';
import { FOCUS_TARGET } from './navigation_focus_target';
const domParser = new DOMParser();
@@ -311,9 +312,9 @@ class Status extends ImmutablePureComponent {
window.open(path, '_blank', 'noopener');
} else {
if (history.location.pathname.replace('/deck/', '/') === path) {
history.replace(path);
history.replace(path, {focusTarget: FOCUS_TARGET.POST});
} else {
history.push(path);
history.push(path, {focusTarget: FOCUS_TARGET.POST});
}
}
};