Opened 3 weeks ago
Last modified 11 days ago
#65674 new defect (bug)
Tooltip Delay Timer Race Condition (wp-includes/js/wp-tooltip.js)
| Reported by: | fahimmurshed | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 7.0.2 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | javascript |
Description
The timer variable (openTimeout) used to delay tooltip opening was declared in the outer scope of the script's wrapper function. Because it was shared globally across all tooltips, event listeners on separate tooltips interacted with the exact same timer instance. When a user moved their mouse cursor or used keyboard Tab navigation to switch tooltips, the blur/mouseleave event on the previous tooltip would clear the shared timer. This cleared any pending timeout for the next tooltip, preventing it from opening entirely.
Impact: Severe keyboard accessibility breakdown (preventing consecutive tooltip views during Tab traversal) and erratic mouse-hover behavior.
Attachments (2)
Change History (3)
This ticket was mentioned in PR #12721 on WordPress/wordpress-develop by @fahimmurshed.
11 days ago
#1
- Keywords has-unit-tests added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Initialize undefined variables in several functions to prevent PHP 8.2+ warnings (in single_month_title, get_the_generator, WP_HTML_Processor, wp_mime_type_icon, and _wp_privacy_send_request_confirmation_notification).
Fix a bug in do_enclose() where the enclosure meta was storing the variable name 'mime' instead of the actual MIME type variable '$type'.
Add aria-hidden attribute to dashicons span for improved accessibility, and add test coverage for the do_enclose fix with no-extension content types.
### Description
This PR addresses multiple PHP 8.2+ compatibility issues, undefined variable warnings, a bug in enclosure postmeta creation, accessibility improvements, and unit test coverage:
single_month_title(): Initialized$my_yearand$my_monthto preventE_WARNINGnotices when$monthnumis supplied without$year.get_the_generator(): Initialized$gento an empty string beforeswitch ( $type )to handle custom generator types passed via filters without throwing undefined variable warnings.WP_HTML_Processor::in_body_any_other_end_tag(): Initialized$node = nullprior to traversing open element stack to avoid undefined variable access when stack is empty.wp_mime_type_icon(): Initialized$icon = falsebefore mime type matching loop to guarantee definition when passed towp_mime_type_iconfilter._wp_privacy_send_request_confirmation_notification(): Initialized$manage_urlto avoid undefined variable warnings when custom privacy request actions are used.do_enclose()Bug:do_enclose()inwp-includes/functions.phpto use$typeinstead of undefined$mimewhen setting theenclosurepostmeta value. This resolves anE_WARNINGnotice under PHP 8+ and ensures the HTTPContent-Typeheader (e.g.video/mp4) is correctly persisted for URLs without extension mapping.aria-hidden="true"to decorative<span class="dashicons dashicons-warning"></span>element in recovery mode notices withinclass-wp-plugins-list-table.phpto improve screen reader accessibility.header-type-no-extensionand HTTP response mocking intests/phpunit/tests/functions/doEnclose.phpto verifydo_enclose()processes extensionless media URLs without PHP 8 warnings.Trac ticket: https://core.trac.wordpress.org/ticket/65674
## Use of AI Tools
AI assistance: Yes
Tool(s): Antigravity AI
Model(s): Gemini 3.6 Flash
Used for: Identifying PHP 8.2+ undefined variable warnings and
do_enclose()bug, generating unit test dataset, and assisting with code formatting. All code changes and tests were verified against static analysis tools and unit tests.