Update of `anchor_popup` function to let it build some accessible links ... #1012

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

e-picas commented Feb 4, 2012

Just some few changes:

  • replace the javascript:void(0) instruction by the URL for the href attribute,
  • add a target=_blank attribute,
  • add a return false instruction to the end of the onclick attribute.

This way, if the browser can execute JS the popup will be open just as usual, and if it doesn't a new window will be open ...

Update of `anchor_popup` function to let it build some accessible lin…
…ks ...


Just some few changes:
-   replace the `javascript:void(0)` instruction by the URL for the `href` attribute,
-   add a `target=_blank` attribute,
-   add a `return false` instruction to the end of the `onclick` attribute.

This way, if the browser can execute JS the popup will be open just as usual, and if it doesn't a new window will be open ...

I was about to suggest this, but I'm glad I'm not the only one who cares about this issue. The link become more accessible if the href attribute is correctly populated with the URL. It's also very easy to fix, while granting more benefits to users.

Contributor

narfbg commented Jun 12, 2012

The target attribute is not allowed in XHTML 1.0 Strict.

Contributor

narfbg commented Jun 16, 2012

... and with that said, I just made the other changes: 81c3208

You can still pass a "target" attribute, if you need it.

@narfbg narfbg closed this Jun 16, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment