User tests: Successful: Unsuccessful:
Pull Request for Issue #44728
this PR adds accessibility attributes (name, id, aria-labelledby) to form elements in the PHPDebugBar settings panel that are dynamically generated by the vendor library.
Problem
The PHPDebugBar settings panel contains form elements (select dropdowns, checkboxes, text inputs) that lack name and id attributes. This causes browser DevTools warnings:
"A form field element should have an id or name attribute"
These warnings indicate accessibility issues that prevent programmatic access to form controls and create barriers for assistive technologies.
Since the form elements are generated by the vendor library (php-debugbar), which should not be modified, this fix injects the required attributes via Joomla's debug plugin JavaScript after the debugbar initializes.
The implementation uses:
phpdebugbar-theme, phpdebugbar-hide-empty-tabs)name, id, and aria-labelledby attributesBefore fix:
[DOM] A form field element should have an id or name attribute
After fix:
No warnings related to PHPDebugBar form elements.
| File | Description |
|---|---|
build/media_source/plg_system_debug/js/debug.es6.js |
Source JavaScript with accessibility fix |
media/plg_system_debug/js/debug.js |
Compiled JavaScript |
media/plg_system_debug/js/debug.min.js |
Minified JavaScript |
addAccessibleAttributesToForm(settingsForm) - Adds name, id, and aria-labelledby attributes to form elementsfixDebugBarFormAttributes() - Sets up MutationObserver and fallbacks to apply the fixFixes #44728
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository NPM Change |
| Labels |
Added:
NPM Resource Changed
PR-5.4-dev
|
||
| Title |
|
||||||
Wouldnt it be better to contribute these accessibility fixes upstream to the phpdebugbar repo
Thank you for the clarification, Brian. I wasn't aware that these media files were auto-generated or that this specific component was upstream. I will close this PR and check the upstream repository instead. Thanks for the guidance!
| Status | Pending | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-16 11:38:42 |
| Closed_By | ⇒ | Jaimin2687 |
Wouldnt it be better to contribute these accessibility fixes upstream to the phpdebugbar repo