This commit is contained in:
@@ -50,7 +50,7 @@ export function formHelpControlVisible(control: HTMLElement): boolean {
|
||||
|
||||
export function formHelpControls(document: Document): HTMLElement[] {
|
||||
const roots = document.querySelectorAll(
|
||||
'main,[role="main"],[role="dialog"]',
|
||||
'main,[role="main"],[role="dialog"],dialog[open]',
|
||||
);
|
||||
return [
|
||||
...new Set(
|
||||
@@ -68,7 +68,7 @@ export function formHelpGroupControls(
|
||||
control: HTMLElement | null,
|
||||
): HTMLElement[] {
|
||||
const scope = control?.closest(
|
||||
'form,fieldset,[data-form-help-context],[role="dialog"]',
|
||||
'form,fieldset,[data-form-help-context],[role="dialog"],dialog[open]',
|
||||
);
|
||||
const controls = formHelpControls(document);
|
||||
return scope ? controls.filter((node) => scope.contains(node)) : controls;
|
||||
@@ -156,7 +156,9 @@ export function formHelpStep(control: HTMLElement): {
|
||||
code: investment.dataset.investmentStep ?? '',
|
||||
context: 'investor-path',
|
||||
};
|
||||
const scope = control.closest('fieldset,section,form,[role="dialog"]');
|
||||
const scope = control.closest(
|
||||
'fieldset,section,form,[role="dialog"],dialog[open]',
|
||||
);
|
||||
const titleId = scope?.getAttribute('aria-labelledby');
|
||||
const title =
|
||||
(titleId
|
||||
|
||||
Reference in New Issue
Block a user