Support » Plugin: WP Accessibility » Allow specific links to open in a new tab

  • Resolved Gal Baras

    (@galbaras)


    In general, it’s good to open links in the same tab, but sometimes, it’s not. For example, I want the Google Reviews widget links to open in another tab.

    Currently, there a way to stop WPA from removing the target (or tabindex) from these links (elements)? It’ll be good to add filters on $targets and $tabindex in wp-accessibility.php.

    Even better, these fields can be set to plugin settings that default to the currently hardcoded values. This will allow developers to have more control and do things that make sense to them, instead of having sweeping removals of attributes.

    • This topic was modified 4 months ago by Gal Baras. Reason: Adjusted after looking at the plugin code

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    You can open links in a new tab if you define it using an alternate method, such as selectively catching a particular link using JS. I won’t be adding any method to create exceptions in WP Accessibility, however.

    Thread Starter Gal Baras

    (@galbaras)

    Dude, that’s no how the WordPress community works. Plugin developers need to consider how their plugins are being used, not just rule without discussion.

    Since you’re removing the attribute in JS, it’s easy enough to ignore anchor tags with other attributes, e.g. data-target=”keep”. It doesn’t add much to the complexity or maintenance load of developing the plugin, but gives site builders the ability to decide what happens on their site.

    Plugin Author Joe Dolson

    (@joedolson)

    You are absolutely welcome to open an issue in the Github repository and/or make a pull request. If you present it as completed work, it’s totally reasonable for me to consider incorporating it.

    However, I am under absolutely no obligation to make changes to a completely free plugin just because a member of the community asks for it. I have a finite amount of time I can devote to it, and that’s not a priority for me.

    You can already control what happens on your site without using this feature in the plug-in; it only offers an easier way for you to set it up. But, as you observe, the removal in JS is very simple, and you could implement your own version of it.

    Plugin Author Joe Dolson

    (@joedolson)

    Github repository for WP Accessibility: https://github.com/joedolson/wp-accessibility/

    Thread Starter Gal Baras

    (@galbaras)

    Done. I hope this helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.