The “close” button in the cookie panel is not keyboard accessible

[ad_1]

Hi, I work on a site which has recently undergone some accessibility testing and an issue was found with the “close” button which highlighted that the button is not keyboard accessible. In my own testing I have also found this to be true. I’m not sure if this is the lack of a “tabindex” attribute on the link or a side effect of it having the role="button" attribute.

The button markup as rendered on this site shows as follows:

<a role="button" data-cli_action="accept" id="cookie_action_close_header" class="medium cli-plugin-button cli-plugin-main-button cookie_action_close_header cli_action_button wt-cli-accept-btn" style="margin: 10px; color: rgb(255, 255, 255); background-color: rgb(0, 185, 185);">Close</a>

Could the markup for this be modified to make it keyboard accessible please?

Thanks!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer