a11ySea / testing

Collect accessibility issues for public websites
3 stars 3 forks source link

King County COVID19 - Bug: Escape key should close the chatbot window #21

Closed alboss closed 4 years ago

alboss commented 4 years ago

Issue Summary

The escape key on the keyboard does not close the chatbot window

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to https://kingcounty.gov/depts/health/covid-19.aspx
  2. Click on COVID-19 Questions?
  3. Try to close the pop-up by using the ESC key on the keyboard
  4. Nothing happens

Behavior

Expected behavior

Actual behavior

Device Information:

Code

Suggested Code

Probably something like this:

window.addEventListener('keydown', function (event) {
  if (event.key === 'Escape') {
    chatFrame.style.visibility = 'hidden';
  }
})

Specifications

dereksheppard commented 4 years ago

@alboss I published the change and added it to my repo.

alboss commented 4 years ago

Fixed; thank you!