WordPress.org

Ready to get started?Download WordPress

Forums

WP Accessibility
javascript warning on jquery( '#' ) request (7 posts)

  1. Peter Massey-Plantinga
    Member
    Posted 1 year ago #

    The toolbar sends a warning every time one clicks on an anchor with href="#" because jquery doesn't handle it.

    [15:29:47.944] Error: Syntax error, unrecognized expression: # @ http://localhost/wp-includes/js/jquery/jquery.js?ver=1.9.1:4421

    the functions in a11y.js from line 108-126 should be updated to avoid hrefs that are just '#'.

    http://wordpress.org/extend/plugins/wp-accessibility/

  2. Joe Dolson
    Member
    Plugin Author

    Posted 1 year ago #

    I'll mention that to the developer of that library, and look into fixing it in my plug-in. That's work that I incorporated into the plug-in.

  3. TommyNation
    Member
    Posted 10 months ago #

    This may be what makes WP Accessability break my The Events Calendar plugin... Switching views between month/list doesn't work when the WP Accessibility toolbar is enabled.

    Edit: Yep, commenting out those lines 108-127 did the trick!

    I posted the workaround on The Events Calendar forum as well:
    http://wordpress.org/support/topic/switching-views-listmonth-nothing-happening

  4. Joe Dolson
    Member
    Plugin Author

    Posted 10 months ago #

    Are you on the latest version of WP Accessibility? I thought that I'd fixed this issue; but I may not have covered every use case.

  5. TommyNation
    Member
    Posted 10 months ago #

    Yes, latest version I believe (1.2.5). The Events Calendar plugin uses some sort of method involving # links and Ajax to change views apparently.

  6. Joe Dolson
    Member
    Plugin Author

    Posted 10 months ago #

    I don't think it's the hash link, specifically - but I'll do some testing to see what the actual interaction is. I've tested this with links in the form of <a href='#'></a> triggering some kind of scripting and it has worked with all my tests; so something more is going on.

    Of course, commenting out those lines of code is a totally reasonable short-term solution, but solutions that require you to edit the plug-in every version aren't the best long-term choice.

  7. TommyNation
    Member
    Posted 10 months ago #

    Yeah. Having worked to configure this "The Events Calendar plugin" for a couple of days now, I think it has certain issues which may or may not also cause the weird link behaviour, but I can only speculate.

    Yes, at least I have a workaround for this special case with the calendar plugin :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic