Aiven-Open / klaw

Klaw, the latest OS tool by Aiven, helps enterprises cope with Apache Kafka(r) topics, schema registry and connectors governance by introducing roles/authorizations to users of various teams of an org.
https://www.klaw-project.io/
Apache License 2.0
150 stars 60 forks source link

fix: Modal in table is not working properly for screenreader #701

Closed programmiri closed 1 year ago

programmiri commented 1 year ago

screen reader / keyboard behaviour is wrong when opening Modal from in a table row (chromium browser)

If modal is opened from a button on the page, it behaves correctly:

when it's opened from a button inside a cell of DataTable, it stays on this button. Navigating around reads an empty table with no rows/columns and an empty main.

Recording

https://user-images.githubusercontent.com/943800/222240859-f230eb3f-419d-47d7-a290-82b2746cc390.mov

programmiri commented 1 year ago

I've not yet found the reason for this 😩

Findings for now

body
    root (tabindex -1, inert true, aria-hidden true)
    div-with-modal

document.activeElement is, in both cases, the heading in the modal.

mathieu-anderson commented 1 year ago

This seems to have been resolved, I cannot reproduce the behavior described in the issue and visible in the video:

https://github.com/Aiven-Open/klaw/assets/20607294/2e94fd76-113d-4697-8812-fc7d52f965fa

programmiri commented 1 year ago

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 That's nice! It seems to have been a browser issue and resolved in Chrome. Will check in Brave later, too, but should be ok there now too