a-digital / cookie-consent-banner

Add a configurable cookie consent banner to the website.
MIT License
11 stars 14 forks source link

An urgent accessibility issue with dismissing banner by keyboard navigation #6

Closed JayBox325 closed 5 years ago

JayBox325 commented 5 years ago

I was just testing a site for keyboard-only users that navigate via tabs and because the dismiss button doesn't have an empty href property using 'return' doesn't dismiss it.

mark-adigital commented 5 years ago

Thanks - have added # as the href attribute now.

JayBox325 commented 4 years ago

Hi @mark-adigital, long time no speak, this is a great solution and worked great, but my client has noticed that it jumps to the top of the page on click due to there being an empty # in the href. Are you able to update it with an empty href= attribute as: <a href="">Got it</a>.

This is valid HTML and it gives the opportunity for keyboard navigators to clear it, but it doesn't have the jump.

mark-adigital commented 4 years ago

Hi @JayBox325 - please see latest release (which includes a lot of other significant updates) for a fix to this. After some reading around, I settled on javascript:void(0); as the least of all evils.