Skip to content

Improve accessibility of inline help tooltips#403

Merged
JLG-WOCFR-DEV merged 1 commit intomainfrom
codex/prioritize-code-recommendations
Oct 16, 2025
Merged

Improve accessibility of inline help tooltips#403
JLG-WOCFR-DEV merged 1 commit intomainfrom
codex/prioritize-code-recommendations

Conversation

@JLG-WOCFR-DEV
Copy link
Owner

Summary

  • add contextual attributes to settings help buttons so each tooltip is associated with its field
  • hide and reveal help bubbles via aria-hidden/hidden flags while keeping announcements through the accessibility API
  • close tooltips automatically when the trigger loses focus to satisfy keyboard navigation expectations

Testing

  • npm test

https://chatgpt.com/codex/tasks/task_e_68f0c3a29144832e94a27a032c3ba567

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +4588 to +4604
$(document).on('focusout', '.blc-field-help', function() {
var $wrapper = $(this).closest('.blc-field-help-wrapper');
if (!$wrapper.length) {
return;
}

if (!nextTarget) {
window.setTimeout(function() {
if (!$openWrapper || !$openWrapper.length) {
return;
}

if (isElementAssociatedWithWrapper(document.activeElement, $openWrapper)) {
window.setTimeout(function() {
var activeElement = document.activeElement || null;
if (activeElement) {
var $active = $(activeElement);
if ($active.closest('.blc-field-help-wrapper').get(0) === $wrapper.get(0)) {
return;
}
}

closeWrapper($openWrapper);
}, 0);
return;
}

closeWrapper($openWrapper);
closeWrapper($wrapper);
}, 0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve open tooltip tracking after blur of other help buttons

The new blur handler always closes the wrapper associated with the button that lost focus and unconditionally nulls $openWrapper. When a user tabs to one help button (without opening it) and then clicks another button to open its tooltip, the first button’s deferred blur runs after the second tooltip opens. Because closeWrapper($wrapper) is invoked for the unfocused button, $openWrapper is cleared while the newly opened tooltip remains visible. The document‐level click, focusin and Escape handlers rely on $openWrapper to dismiss tooltips, so the open tooltip can no longer be closed via those mechanisms and becomes stuck until the trigger is clicked again. Consider guarding the blur handler so it only closes the currently tracked wrapper.

Useful? React with 👍 / 👎.

@JLG-WOCFR-DEV JLG-WOCFR-DEV merged commit fd11ee2 into main Oct 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant