Title: Wrong href syntax
Last modified: March 17, 2025

---

# Wrong href syntax

 *  [darigi](https://wordpress.org/support/users/darigi/)
 * (@darigi)
 * [1 year ago](https://wordpress.org/support/topic/wrong-href-syntax/)
 * Hello everyone,
 * I’m using the Cookie Notice & Compliance for GDPR/CCPA plugin and have encountered
   an accessibility issue related to the markup generated by the plugin.
 * **Description of the problem:**
   The accessibility analyzer reports errors with
   the use of links for actions that do not involve navigation. Specifically, the
   following errors appear:
    - **Issue ID 146:** htmlCopiarEditar`<a href="#" id="cn-accept-cookie" data-
      cookie-set="accept" class="cn-set-cookie cn-button" aria-label="Aceptar" style
      ="background-color: #adadad">Aceptar</a>`
    - **Issue ID 147:** htmlCopiarEditar`<a href="#" id="cn-refuse-cookie" data-
      cookie-set="refuse" class="cn-set-cookie cn-button" aria-label="Rechazar" 
      style="background-color: #adadad">Rechazar</a>`
    - **Issue ID 148:** htmlCopiarEditar`<a href="#" class="cn-revoke-cookie cn-
      button" aria-label="Revocar" style="background-color: #adadad">Revocar</a>`
 * The issue is that `<a>` tags with `href="#"` are being used for actions (accepting,
   rejecting, and revoking cookies), which is not semantically correct. According
   to accessibility best practices, elements that trigger actions should be buttons(`
   <button>`) instead of links, since `<a>` tags are meant for navigation.
 * **My question:**
   Is there any way to modify or override the markup generated 
   by the plugin to resolve this issue? I haven’t found any documentation on the
   matter. I would like to know if there is a hook, filter, or any method to customize
   the HTML (for example, changing `<a>` to `<button>`) so that it complies with
   accessibility recommendations.
 * Thank you in advance for any suggestions or solutions you might offer.
 * Regards,
   Darío Gómez González

Viewing 1 replies (of 1 total)

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [1 year ago](https://wordpress.org/support/topic/wrong-href-syntax/#post-18381298)
 * Hi,
 * Can you please provide some additional information on this. You say that the 
   issue is that elements used for navigation should be buttons not links. Is that
   a requirement or a suggestion – as there is a difference?

Viewing 1 replies (of 1 total)

The topic ‘Wrong href syntax’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=2466385)
 * [Cookie Notice & Compliance for GDPR / CCPA](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

## Tags

 * [href](https://wordpress.org/support/topic-tag/href/)

 * 1 reply
 * 2 participants
 * Last reply from: [dFactory](https://wordpress.org/support/users/dfactory/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/wrong-href-syntax/#post-18381298)
 * Status: not resolved