Closed mittinatten closed 2 years ago
If you have a dialog with a tabindex=-1 heading first and tab past the last element, you circle back to the heading, which should not be keyboard focusable.
tabindex=-1
I guess an easy fix would be to change [tabindex] (here: https://github.com/nrkno/core-components/blob/master/packages/core-dialog/core-dialog.js#L3) to [tabindex]:not([tabindex="-1"]
[tabindex]
[tabindex]:not([tabindex="-1"]
I guess one should add :not([disabled]), to most of the other elements too.
:not([disabled])
If you have a dialog with a
tabindex=-1
heading first and tab past the last element, you circle back to the heading, which should not be keyboard focusable.I guess an easy fix would be to change
[tabindex]
(here: https://github.com/nrkno/core-components/blob/master/packages/core-dialog/core-dialog.js#L3) to[tabindex]:not([tabindex="-1"]