campuspress / divi-accessibility

Improve Divi accessibility in accordance with WCAG 2.0 guidelines.
https://wordpress.org/plugins/accessible-divi/
GNU General Public License v2.0
127 stars 29 forks source link

Make Console Output More Useful for Debugging #74

Open mrwweb opened 2 years ago

mrwweb commented 2 years ago

I was excited to see the "Developer Mode" setting ("Log plugin info to console.") but it didn't quite do what I expected. Looking at the console, it seems to mostly just repeat what the settings screen shows. What would be really useful is if some of the more complex settings could actually log information about what they're doing.

"ARIA Support" is the one I'd love most, because I was having a hard time understanding how and why roles were being added. My dream would be that when "ARIA Support" and "Developer Mode" are on, the console would log an array of objects, where each array object shows the element changes, the ARIA attribute or role change, and a message about the heuristic that led to the change. Something like this:

4 lines of output from Firefox Dev Tools console. Array containing a single object. Object keys are "change" (string, "role = button"), "element" (DOM node representing a link), and "reason" (string, "a element without href")

I could easily imagine similar output for the "Fix Labels", "Focusable Modules", "Skip to Navigation Link", and probably some others.